Specifications
4 - 15
It is also possible to use the four control lines as input lines. To use a control line as an input line,
you must first write to its corresponding bit in the control register. Write a 1 if the line is shown
as active high in Table 4-6, Write a zero if it is shown as active low. This will cause the
corresponding signal line to "float" (be in a TTL high state). The drivers for these lines are open
collector drivers with 10K ohm pullups. When these lines are floating, they can be used as inputs.
In summary, the parallel port can provide up to 12 outputs plus 5 inputs, or up to 17 inputs, as
follows:
Data (8 lines) (Read/Write)
Control (4 lines) (Read/Write)
Status (5 lines) (Read Only)
Bit 4 in the control register (Table 4-6) can be used to enable interrupts. If this bit is high (equal
to 1), then a rising edge on the -ACK (IRQ) line will produce an interrupt.
Table 4-6. Parallel Port Register Bits
REGISTER BIT
SIGNAL NAME
OR FUNCTION
IN/OUT
ACTIVE
HI/LO
J3 PIN
DB25F
PIN
PORT 0 Data 0 i/o high 3 2
1 Data 1 i/o high 5 3
2 Data 2 i/o high 7 4
3 Data 3 i/o high 9 5
4 Data 4 i/o high 11 6
5 Data 5 i/o high 13 7
6 Data 6 i/o high 15 8
7 Data 7 i/o high 17 9
CONTROL 0 -STROBE out* low 1 1
1 -AUTOFD out* low 2 14
2 -INIT out* high 6 16
3 -SEL IN out* low 8 17
4 IRQ Enable --- high --- ---
5 1 --- --- --- ---
6 1 --- --- --- ---
7 1 --- --- --- ---
STATUS 0 1 --- --- --- ---
1 1 --- --- --- ---
2 1 --- --- --- ---
3 -ERROR in low 4 15
4 SEL OUT in high 25 13
5 PAPER EMPTY in high 23 12
6 -ACK (IRQ) in high 19 10
7 BUSY in low 21 11
* Can also be used as input (see text).