PC Parallel Port I/O
The IBM PC/AT Parallel Port
Description
The hardware engineer always want to connect something to their computers. The big issue is that this usually requires opening the case and inserting a prototype ISA card. More and more, however, as ISA cards go away, it will become harder and harder to use the venerable ISA prototype card for simple hardware projects.
In the foreseeable future, however, the IBM PC/AT parallel port can be used for a whole host of projects in place of an ISA bus card.
Parallel port pin description
1-------------/STROBE I/O (inverted on output, non-inverted on input)
2-------------data 0 I/O (non-inverted)
3-------------data 1 I/O (non-inverted)
4-------------data 2 I/O (non-inverted)
5-------------data 3 I/O (non-inverted)
6-------------data 4 I/O (non-inverted)
7-------------data 5 I/O (non-inverted)
8-------------data 6 I/O (non-inverted)
9-------------data 7 I/O (non-inverted)
10------------/ACK input (inverted on input)
11------------/BUSY input (non-inverted)
12------------+PE input (inverted on input)
13------------+SLCT input (inverted on input)
14------------/AUTO output (inverted on output, non inverted on input)
15------------/ERROR input (non-inverted)
16------------/INIT I/O (non-inverted on output, inverted on input)
17------------/SLCT_IN I/O (inverted output, non-inverted input)
18-25 ground
The above description is the classic printer port. There are newer specifications on the market, but, this is the classic which will work with almost anything.
I/O ports and bits
378H or 278H I/O Data latch
8 bits are present on pins 2-9
379H or 279H Input Status bits
bit 0---------Unused
bit 1---------Unused
bit 2---------Unused
bit 3--------/ERROR
bit 4--------+SLCT
bit 5--------+PE
bit 6--------/ACK
bit 7--------/BUSY
37AH or 27AH I/O Printer Controls
bit 0--------/STROBE
bit 1--------/AUTO
bit 2--------/INIT
bit 3--------/SLCT_IN
bit 4--------+IRQ
bit 5--------Unused
bit 6--------Unused
bit 7--------Unused
Notes
The printer port plays tricks with signals on the port, some are inverted on output, some on input, and it is not consistent. Read the pin-out table carefully.
+IRQ is not available on the printer port connector. When that bit is set to 1 a low going pulse on /ACK generates an interrupt.
To read from port X78H (378H or 278H) one must write all ones to the port to allow the peripheral to pull the signal line low.