Page 1 of 1

May I read data from pins "D0-D7" ?

Posted: Thu Sep 17, 2015 11:53 am
by tikhonov66
May I read data (electric states) from LPT-pins "D0-D7" by InpOut32(x64) ?
I use the PCI-LPT with the base adress (D-register) 0xD010.
(I install in my "Win-7 PC" - pci-board "Espada FG-EMT03A-1-BU01" with base chip "MCS9901CV-CC")
In "standard LPT-mode" InpOut32(x64) works OK!!
With all three ports of one:
PORT_D 0xD010
PORT_S 0xD011
But I would to read electric state of LPT (DB25) pins 2-9 - i.e. LPT "D0-D7".
If I try the command
gfpOut32((short)0xD010, foo);
it works - OK!!
- And LEDs on my LED-board say about it...
If then I try to read real electrical state of LPT pins - by command
WORD wData = gfpInp32((short) 0xD010);
it returns the same "foo"-result always - without any impacts
of the real electric state of LPT (DB25) pins 2-9.
I.e. the electrical state of "D0-D7" pins does not read by command "gfpInp32((short) 0xD010)" at all.
If I try EPP-style "data read":
WORD wData = gfpInp32((short) 0xD010+4);
I obtaines 0x00 result constantly.
May I make thomething else to read electrical state of LPT (DB25) pins 2-9 - i.e. LPT "D0-D7"?
- Or it is impossible with my hardware?
Thanks a lot...

Re: May I read data from pins "D0-D7" ?

Posted: Fri Sep 18, 2015 12:32 am
by phil
Sorry, its been about 20 years since I last read/wrote to the parallel port (back in the days of DOS!). I remember that I had to put the port into a different mode (maybe EPP) in order to access the D0-D7 pins but I cant for the life of me remember how I did that (BIOS option seems to ring a bell) but its all changed these days.

I'm afraid, I only ported InpOut32 to windows 64 so I'm no expert. Is there nothing useful on the (the authors) website?