Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

parallel port communication?

Status
Not open for further replies.

asic1984

Full Member level 5
Joined
Nov 15, 2003
Messages
257
Helped
4
Reputation
8
Reaction score
1
Trophy points
1,298
Activity points
2,340
hi all

i wanna make a chat program using the parallel port between 2 pc's

i prefer using c# or c++........but how can i make that chat program

i know how to send data out from the parallel port ......but how to make a handshaking protocol and transfere data ...........

thanks for help
 

U can make a cross cable to link the 2 parallel ports of the 2 PC's connecting the output 8 pins to the input 8 pins of the other and vice versa. Now Just write a Software Handshake protocol to communicate, which won't be much difficult, since you can have to following signal characters:

Request to Transmit
Ready to Receive
Receiving
End of Transmission

By defining these characters u can have a handshake protocol. Also a Hardware handshaking can be done. I did it once but for that I made the data bus bidirectional and used the other pins for handshaking.
 

h**p://www.lvr.com/parport.htm
FYI.
 

what OS do you use ? if it is win 2000/XP first you need a driver. you have the option to write it yourself(if you are an expert programmer) or you may find free drivers in internet. it also deponds on whether your parallel ports are bidirectional or not ?
if they are bidirectional, one computer can act as master the other as slave(hopefully you want to connect only two computers ?). if one of them dosn't support bidirectional then you may use status pins instead of data pins for data communication.
 

Hi!

I prefer to use serial port. It is more easier to use for p-to-p. You will not need any driver. it is enough to open() the port and send(), whatever you want. On the other side (of coz both side) you will need a receiver part.
If you do it under cbuilder some serial port component do most of the work.

I hope it helps
 

hi

thanks all for help

i am using windows xp ........but i know about driver and i pass this problem

but how can i make the handshaking.........(i wanna connect strope from pc1 to strope in pc2 and autofeed in pc1 to autofeed in pc2) and make full interlocked handshaking...............is this connection right

i will use bytemode to make it io/op directions.......

thanks for help
 

hi

i am facing a strange problem

after i change my parallel port mode in the bios to ECP to select byte mode on it .....the pins are not working in the same manner like in the standard mode .....even after i return the mode to standard

the data bits are inverted when i send 0 ...it output one and when i send 1 it output 0 ............and the strope is always 0 ..............what is happeneing

please can any one help on that

thanks
 

hi

well is there is any mode in parallel port that makes data pins output -ve voltage when have logic 0 .........and 0 when have logic 1

because this is what happening in my port now and i wanna change that

thanks for help
 

you need to understand the communication protocol between the two Parallel.
then, you can make use of certain programming language to complete it.
I think that it is not difficult.
 

asic1984 said:
hi

well is there is any mode in parallel port that makes data pins output -ve voltage when have logic 0 .........and 0 when have logic 1

because this is what happening in my port now and i wanna change that

thanks for help
Are you sure? The parallel ports I know are most TTL. Maybe your ground reference is not right?

And lastly, most such applications use the serial port instead.
 

hi

yes checkmate................i found that the ground pin is not right :roll:

thanks for your help
 

theblond said:
Hi!

I prefer to use serial port. It is more easier to use for p-to-p. You will not need any driver. it is enough to open() the port and send(), whatever you want. On the other side (of coz both side) you will need a receiver part.
If you do it under cbuilder some serial port component do most of the work.

I hope it helps

me too, there are programs for u to transfer between 2 pcs using serial cable (so called "laplink" in the old days).

using parallel port seems complicated due to the handshaking... btw, what's the maximum transfering speed that can be achieved using parallel port?
 

parallel communication is very convenient to design.
firstly, you need to understand the protocal of communication. and then you need to design the corresponding software and hardware. try it.
 

what does it mean by "convenient"?

selling points of using paralllel ports?


serial port is quite simple...
 

Hi Asic1984,


If you use NT technology (Win2000, XP) the frendly instructions

inport and outport

dont work anymore (like in win98 for example).

(to see haw they previously work under win98, and a discusion abaut SPP, EPP protocols modes plz see post )

In NT you must use a kernel driver to comunicate with HW.
Those drivers must be first instaled on your PC .

Then you can use Win API functions to comunicate with kernel driver from C++

In C# you cannot call directly any "unmanaged" API functions!!
Therefore in C# you must use PlatformInvoke to "manage" them!
This is not a trivial task!

Also note that Paralel port is a "legacy" device (read: no future).
Therefore is highly recomended to use other bus (USB for instance).

Also some controls pins are inverted in SPP mode , and some hand-shake pins are active low in EPP mode, that's why you observed some "inverted levels" at conector (this is normal). For protocol details see Paralel Port standard.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top