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

Reading data pins of parallel port

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Hobby Circuits and Small Projects Problems
Author Message
electric_pk



Joined: 08 Dec 2006
Posts: 3


Post14 Dec 2006 12:46   Reading data pins of parallel port

I m using assembly language. Plz tell me how to read data pins of parallel port. wat shud be the status of control pins and status pins to make datapins bi-directional. Actually after reading from data pins I want to output the data (not the data which I read from datapins) on control pins.
Back to top
ashad



Joined: 28 Mar 2006
Posts: 303
Helped: 9
Location: Singapore


Post25 Dec 2006 0:48   Re: Reading data pins of parallel port

basically the LPT or parallel port having different modes ECP EPP .... in normal mode in which the data port is only for the output port and status input port, control is the output port...

but in ECP mode u can use the data port as the input port so u have to configure the lpt port in the ECP then interface...

read the PDF

http://www.edaboard.com/viewtopic.php?p=751741#751741
Back to top
aldevan



Joined: 02 Aug 2005
Posts: 147
Helped: 12
Location: São Paulo - Brazil


Post25 Dec 2006 2:14   Re: Reading data pins of parallel port

you can use instruction MOV for example inicialize a LPT1
mov ah, 1 ; init a printer
mov dx, 0 ; LPT1
int 17h ; call a interrupt
Back to top
Shani



Joined: 26 Jul 2006
Posts: 61
Helped: 3
Location: Karachi, Pakistan


Post28 Dec 2006 17:52   Reading data pins of parallel port

Assalamo Allykum !

If you want to read the data from the data pins of the parallel port then

First you high the 5th Bit of the Control. This pin is not physically present.

Then you should high all the data pins.

Now you can receive the data from the data pins of the parallel port.

BAsically the 5th Bit of CONTROL set the port bidirectional.

If it is "0" the you can out data

If it is "1" then you can read data.

Wish you a good luck

Take Care
Back to top
saeed_pk



Joined: 20 May 2006
Posts: 121
Helped: 2


Post30 Jan 2007 13:15   Re: Reading data pins of parallel port

AA
If u know how to use debug utility of windows then

Try out the following

o 37A 20 // Sets the LPT1*(Data pins) in input mode
o 37A 80 // Sets the LPT1*(Data pins) in output mode
now
if
o 378 0xXX where XX is hexadecimal no 00-to-FF it outputs that 8-bit data
i 378 inputs the 8-bit data given on data pins if these are set in input mode

* if 0x378 is the adress of parallel port
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Hobby Circuits and Small Projects Problems
Page 1 of 1 All times are GMT + 1 Hour


Abuse
Administrator
Moderators
topic RSS 
sitemap