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.

Reading data pins of parallel port

Status
Not open for further replies.

electric_pk

Newbie level 3
Joined
Dec 8, 2006
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,309
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.
 

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
 

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
 

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
 

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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top