Bidirectional LPT port under DOS

P

Pavel

Guest
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.
 
On Fri, 18 Jun 2004 15:49:25 +0200, "Pavel" <pavel@polbox.com> wrote:

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.
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 <conio.h>

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.
 
You might also need to #include <dos.h> or something.
 
"Pavel" <pavel@polbox.com> schreef in bericht
news:caurtt$d5h$1@atlantis.news.tpi.pl...
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.
Pavel,

Have a look at

http://www.beyondlogic.org/

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
 

Welcome to EDABoard.com

Sponsor

Back
Top