Bidirectional LPT port under DOS

Hello,

I would like to read data D0..D7 from LPT port. But I have problem with this.

I did a test (found on the internet) which should tell me, my port is bidirectional or not:

- send a byte (but not 255) on 0x378,

- send 0x20 on 0x37A,

- read a byte from 0x378 If sent byte == read byte, LPT is NOT bidirectional. If read byte == 255, LPT is bidirectional.

I did this test for all settings in BIOS (Normal, EPP, ECP, EPP+ECP), and it showed that my LPT is NOT bidirectional.

I have Asus P2BF motherboard with Celeron processor, and I don`t suppose my motherboard doesn`t have bidirectional LPT.

What to do to set up bidirectional LPT ?

Thanks in advance, Pavel.

Reply to
Pavel
Loading thread data ...

It's very unlikely that a mobo recent enough to have a celeron processor wouldn't have a bi-directional printer port.

You are outputting data on 0X37A, I take it you have some sort of wrap around plug fitted in the socket ?

Try something like

#include

int main() { while(!kbhit()) cprintf("\r%02X", inp(0X378)); return(0); }

and touch each of the data wires to ground or 5V and see if anything changes. Some OSs like XP and win2K take over IO ports and will not release them for programs running in a dos box.

Kev.

Reply to
Kevin R

You might also need to #include or something.

Reply to
Kevin R

"Pavel" schreef in bericht news:caurtt$d5h$ snipped-for-privacy@atlantis.news.tpi.pl...

Pavel,

Have a look at

formatting link

especially the chapter on parallel port interfacing.

FAIK the P2B series of ASUS has the properties of the parallel port set by BIOSsetup.

petrus bitbyter

--
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.707 / Virus Database: 463 - Release Date: 15-6-2004
Reply to
petrus bitbyter

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.