parallel port hardware

The parallel port of a typical PC uses a 25-pin D-type female connector (DB-25 S), this is the most common case, however it is convenient to mention the three types of connectors defined by the IEEE 1284 standard, the first , called 1284 type A is a 25-pin female connector of type D, that is, the one mentioned at the beginning.

The second connector is called 1284 type B which is a 36 pin centronics type connector and is found on most printers; the third is called 1284 type C, it is a connector similar to 1284 type B but smaller, it is also said to have better electrical and mechanical properties, this connector is recommended for new designs. The following table describes the function of each pin on the 1284 Type A connector:

Pin IS Active Polarity Description
1 Departure from 0 Strobe
2-9 Departure from -

Data Line(bit 0/pin 2, bit 7/pin9)

10 Home 0 Acknowledge line (active when the remote system takes data)
11 Home 0 Busy line (if active, remote system is not accepting data)
12 Home 1 Out of paper line (if active, the printer is out of paper)
13 Home 1 Select line (if active, the printer has been selected)
14 Departure from 0 Autofeed line (if enabled, the printer inserts a new line for each carriage return)
15 Home 0 Error line (if active, there is an error in the printer)
16 Departure from 0 Init Line (If kept active for at least 50 micro-seconds, this signal auto-initializes the printer)
17 Departure from 0 Select input line (When inactive, forces the printer to go offline)
18-25 - - electrical ground

Standard Parallel Port Configuration

 

Note that the parallel port has 12 output lines (8 data lines, strobe, autofeed, init, and select input) and 5 input lines (acknowledge, busy, out of paper, select, and error). The IEEE 1284 standard defines five modes of operation:

  1. Compatible mode
  2. nibbling mode
  3. byte mode
  4. EPP mode, extended parallel port
  5. ECP mode, extended capacity port 

The goal of the standard is to design new devices that are fully compatible with the standard parallel port (SPP) originally defined by IBM (in this article I will deal only with the compatible mode). There are three I/O addresses associated with a PC parallel port, these addresses pertain to the data register, the status register, and the control register. The data register is an eight-bit read-write port. Reading the data register (in one-way mode) returns the last value written to the data register. The control and status registers provide the interface to the other I/O lines. The distribution of the different signals for each of the three registers of a parallel port is given in the following tables:

You can see a series of two-digit numbers (eight in total), this is the memory dump starting at address 40:0008h. The first six pairs of numbers represent the base addresses for the installed parallel ports, in the image above you can see that the only parallel port on my machine is at address 0x378h (78 03). The numbers are inverted because Intel stores such information in a "low order byte - high order byte" format. Once we obtain the desired information, we close the Debug.exe program simply by typing the letter q and pressing the enter key. To close the MS-DOS Prompt window, type the word exit and press the enter key.