Rules | Recent posts | topic RSS | Search | Register  | Log in

parallel port communication?

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing
Author Message
asic1984



Joined: 15 Nov 2003
Posts: 265
Helped: 3


Post30 Oct 2004 4:44   parallel port communication?

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
Back to top
aryajur



Joined: 23 Oct 2004
Posts: 675
Helped: 69
Location: Sunnyvale, USA


Post01 Nov 2004 15:15   Re: parallel port communication?

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.
Back to top
flylionking



Joined: 11 Dec 2003
Posts: 20


Post02 Nov 2004 7:16   parallel port communication?

h**p://www.lvr.com/parport.htm
FYI.
Back to top
Bluechem



Joined: 05 Sep 2004
Posts: 71
Helped: 1


Post02 Nov 2004 9:41   Re: parallel port communication?

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.
Back to top
theblond



Joined: 06 Sep 2004
Posts: 5
Location: Hungary


Post05 Nov 2004 16:55   Re: parallel port 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
Back to top
asic1984



Joined: 15 Nov 2003
Posts: 265
Helped: 3


Post19 Nov 2004 3:16   Re: parallel port communication?

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
Back to top
asic1984



Joined: 15 Nov 2003
Posts: 265
Helped: 3


Post19 Nov 2004 12:44   Re: parallel port communication?

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
Back to top
asic1984



Joined: 15 Nov 2003
Posts: 265
Helped: 3


Post19 Nov 2004 15:28   Re: parallel port communication?

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
Back to top
Jackwang



Joined: 12 Nov 2004
Posts: 167
Helped: 2


Post24 Nov 2004 5:45   parallel port communication?

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.
Back to top
checkmate



Joined: 25 Feb 2004
Posts: 489
Helped: 35
Location: Toilet Seat


Post24 Nov 2004 11:03   Re: parallel port communication?

asic1984 wrote:
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.
Back to top
asic1984



Joined: 15 Nov 2003
Posts: 265
Helped: 3


Post24 Nov 2004 18:58   Re: parallel port communication?

hi

yes checkmate................i found that the ground pin is not right Rolling Eyes

thanks for your help
Back to top
njbibin



Joined: 14 Dec 2004
Posts: 25


Post17 Dec 2004 23:47   parallel port communication?

see my e-book

i had written on it

otherwise mail me at njbibin(at)rediffmail.com

see this link for e-books

www.njbibin.blogspot.com
Back to top
banh



Joined: 16 Dec 2004
Posts: 472
Helped: 12


Post18 Dec 2004 18:12   Re: parallel port communication?

theblond wrote:
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?
Back to top
nj_jack



Joined: 09 Nov 2004
Posts: 90


Post23 Dec 2004 6:53   parallel port communication?

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.
Back to top
banh



Joined: 16 Dec 2004
Posts: 472
Helped: 12


Post23 Dec 2004 6:57   Re: parallel port communication?

what does it mean by "convenient"?

selling points of using paralllel ports?


serial port is quite simple...
Back to top
mandrei



Joined: 10 Jan 2004
Posts: 67
Helped: 2


Post24 Dec 2004 17:26   Re: parallel port communication?

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 http://www.edaboard.com/viewtopic.php?t=72796)

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.
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> PC Programming and Interfacing
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap