I am using inpout32.dll.
I want to know when an external event occurs. I want to use parallel port to find out when it happens. I've gotten info that I should apply 5v to pin (10-12 to set it "on" or 1. If I apply 0v it should be "off" or zero.
Great. Simple enough. I take a transformer outputtin 4.5V and connect the + wire to pin 12 and the - wire to pin 20. Then I use this code (inpout32.dll example) to check the pins:
for (i= 0x378; (i<(PPORT_BASE+8)); i++) {
x = Inp32(i);
printf("Port read (%04X)= %04X\n",i,x);
}
I get:
Port read (0378)= 0001
Port read (0379)= 007F
Port read (037A)= 00C0
Port read (037B)= 00FF
Port read (037C)= 00FF
Port read (037D)= 00FF
Port read (037E)= 00FF
Port read (037F)= 00FF
If I take the transformer off the value remain the same. Shouldn't 0379 change to something?
If the write to 0378 I see the first line change to whatever I want.