The Parallel Port

When IBM introduced the PC in 1981, the parallel printer port (often referred to even now as LPT, meaning line print terminal) was included as an alternative to the serial port for connecting a printer. The parallel port could transfer 8 bits of data at a time, whereas the serial port transmitted only one bit at a time. It used a 25-wire connector to transmit the data and the various control signals used by the printer.

The parallel port

The parallel port

Originally, the parallel port allowed for communication in one direction only (computer to printer), and the maximum data transfer rate was around 150 Kbps. There was no standard for the interface, which made it difficult to guarantee correct operation on different platforms, and external cables were limited to two metres in length. The parallel port eventually evolved into the Enhanced Parallel Port (EPP), which allowed bi-directional communication, and a data rate of up to 2 Mbps in both directions, on cables up to nine metres in length. The parallel port on a PC consists of a connector with 17 signal lines and 8 ground lines. The signal lines are divided into three groups:

In the original Standard Parallel Port (SPP), the control lines are used to send control signals from the PC to the printer. The status lines are used to send control signals and status information (for example, to indicate that the printer is busy or out of paper) from the printer to the PC. The data lines carry data from the PC to the printer, in one direction only. Later implementations of the parallel port allowed data to be sent from a peripheral device to the PC. The table below identifies each of these signals, and gives their SPP definitions.

Standard Parallel Port (SPP) Signals
GroupSPP SignalDB25 PinIn/OutSignal Description
ControlSTROBE01OutActive low. Indicates valid data is on the data lines.
SELECTIN13OutActive low. Used to indicate to the printer that it is
AUTOFEED14OutActive low. Instructs the printer to automatically
insert a line feed for each carriage return.
INIT16OutActive low. Used to reset the printer.
StatusACK10InA low asserted pulse used to indicate that the last
character was received.
BUSY11InA high signal asserted by the printer to indicate that
it is busy and cannot take data.
PAPER END12InPaper Empty.
ERROR15InAsserted low to indicate that some error condition
SELECT17InAsserted high to indicate that the printer is online.
DataDATA 002OutOutput only in SPP.
DATA 103Out
DATA 204Out
DATA 305Out
DATA 406Out
DATA 507Out
DATA 608Out
DATA 709Out

Each signal is assigned to a specific bit within the registers that make up the hardware/software interface to the parallel port. The registers are a block of 3 registers starting from the parallel port's base address. These ports are referred to as the LPT ports and have the I/O base addresses of 3BCh, 378h and 278h. Implementations of the parallel port that support the advanced modes of the IEEE1284 standard use 8 to 16 registers and are located at I/O addresses 378h or 278h or, in the case of a Plug and Play compliant parallel adapter, are re-locatable. Table 2.2.2 identifies the registers for the standard parallel port.

Port Addresses

The parallel port has three frequently used address blocks - 3BCh-3BFh (4 bytes), 378h-37Fh (8 bytes), and 278h-27Fh (8 bytes). The 3BCh base address was originally used for parallel ports on video cards, and fell into disuse when video cards ceased to use parallel ports. It later reappeared as an option for an LPT base address. LPT1 is normally assigned base address 378h, while LPT2 is assigned base address 278h. The parallel port device registers occupy 3 bytes, beginning at the specified base address, and the bits in each register have specific signals associated with them, as shown in the table below.

Standard Parallel Port (SPP) Registers
Register OffsetNameRead/WriteBit No.Description
Base + 0Data PortW7Data 7 (Pin 9)
6Data 6 (Pin 8)
5Data 5 (Pin 7)
4Data 4 (Pin 6)
3Data 3 (Pin 5)
2Data 2 (Pin 4)
1Data 1 (Pin 3)
0Data 0 (Pin 2)
Base + 1Status PortR7Busy
5Paper Out
4Select In
2IRQ (Not)
Base + 2Control PortR/W7Unused
5Enable bi-directional Port
4Enable IRQ Via Ack Line
3Select Printer
2Initialize Printer (Reset)
1Auto Linefeed

The parallel port specification was formalised by the IEEE 1284 standard in 1994. This standard defines several modes of operation, including Compatibility mode, which allows data transfer in one direction only, Enhanced Parallel Port (EPP) mode, and Extended Capabilities Port (ECP) mode. The EPP and ECP modes both provide for bi-directional communication, with the assistance of additional hardware that generates and manages handshaking. IEEE1284 standards for the cable, connector and electrical interface guarantee interoperability between all parallel peripherals, and ensure that data integrity is maintained, even at high data rates, at a distance of up to 30 feet.