The parallel port's base address (called ``BASE'' below) is 0x3bc for /dev/lp0,
0x378 for /dev/lp1, and 0x278 for /dev/lp2. If you only want to control
something that acts like a normal printer .
The port BASE+0 (Data port) controls the data signals of the port (D0 to D7 for
bits 0 to 7, respectively; states: 0 = low (0 V), 1 = high (5 V)). A write to
this port latches the data on the pins. A read returns the data last written in
standard or extended write mode, or the data in the pins from another device in
extended read mode.
The port BASE+1 (Status port) is read-only, and returns the state of the
following input signals:
Bits 0 and 1 are reserved.
Bit 2 IRQ status (not a pin, I don't know how this works)
Bit 3 ERROR (1=high)
Bit 4 SLCT (1=high)
Bit 5 PE (1=high)
Bit 6 ACK (1=high)
Bit 7 -BUSY (0=high)
The port BASE+2 (Control port) is write-only (a read returns the data last
written), and controls the following status signals:
Bit 0 -STROBE (0=high)
Bit 1 -AUTO_FD_XT (0=high)
Bit 2 INIT (1=high)
Bit 3 -SLCT_IN (0=high)
Bit 4 enables the parallel port IRQ (which occurs on the low-to-high transition
of ACK) when set to 1.
Bit 5 controls the extended mode direction (0 = write, 1 = read), and is
completely write-only (a read returns nothing useful for this bit).
Bits 6 and 7 are reserved.
Pinout (a 25-pin female D-shell connector on the port) (i=input, o=output):
1io -STROBE, 2io D0, 3io D1, 4io D2, 5io D3, 6io D4, 7io D5, 8io D6,
9io D7, 10i ACK, 11i -BUSY, 12i PE, 13i SLCT, 14o -AUTO_FD_XT,
15i ERROR, 16o INIT, 17o -SLCT_IN, 18-25 Ground