used to read the status of the port. The PPIO does not need to use this port as an input port.

Again, referring to Table 1, if you input the data on port 0379H, then whatever TTL level pins 15, 13, 12, 10, and 11 are will show up as bits 3 through 7. The state of bits 0, 1, and 2 will be unknown since they are not hooked to anything, but they probably will be HIGH (ONE). Note that the data on pin 11 will be inverted, if pin 11 is LOW you will get a HIGH on bit 7. The pins with the “bars” over them are all inverted. This is done by the hardware in the parallel port over which we have no control. A way to read these pins using GWBASIC is: A1=INP(&H379). A1 will then have the results of the input from port address 0379H. Bit 3 of A1 will have the status of pin 15, bit 4 the status of pin 13, etc.

Note that on the third address (037AH) the pins can be either inputs or outputs. If you use the GWBASIC command OUT &H37A,&H01 (00000001 BINARY) then pin 1 will be LOW (because it is inverted), pins 14 and 17 will be HIGH (they also are inverted), and pin 16 will be LOW (it is not inverted).

4

PPIO2899 Manual

B&B Electronics Mfg Co Inc – 707 Dayton Rd - PO Box 1040 - Ottawa IL 61350 - Ph 815-433-5100 - Fax 815-433-5104

Page 6
Image 6
B&B Electronics PPIO manual