
Interfacing the Standard Parallel Port http://www.senet.com.au/~cpeacock
Interfacing the Standard Parallel Port Page 4
Centronics?
Centronics is an early standard for transferring data from a host to the printer. The majority of
printers use this handshake. This handshake is normally implemented using a Standard Parallel Port
under software control. Below is a simplified diagram of the ‘Centronics’ Protocol.
Data is first applied on the Parallel Port pins 2 to 7. The host then checks to see if the printer is
busy. i.e. the busy line should be low. The program then asserts the strobe, waits a minimum of 1µS,
and then de-asserts the strobe. Data is normally read by the printer/peripheral on the rising edge of the
strobe. The printer will indicate that it is busy processing data via the Busy line. Once the printer has
accepted data, it will acknowledge the byte by a negative pulse about 5µS on the nAck line.
Quite often the host will ignore the nAck line to save time. Latter in the Extended Capabilities
Port, you will see a Fast Centronics Mode, which lets the hardware do all the handshaking for you. All
the programmer must do is write the byte of data to the I/O port. The hardware will check to see if the
printer is busy, generate the strobe. Note that this mode commonly doesn’t check the nAck either.
Port Addresses
The Parallel Port has three commonly used base addresses. These are listed in table 2, below.
The 3BCh base address was originally introduced used for Parallel Ports on early Video Cards. This
address then disappeared for a while, when Parallel Ports were later removed from Video Cards. They
has now reappeared as an option for Parallel Ports integrated onto motherboards, upon which their
configuration can be changed using BIOS.
LPT1 is normally assigned base address 378h, while LPT2 is assigned 278h. However this
may not always be the case as explained later. 378h & 278h have always been commonly used for
Parallel Ports. The lower case h denotes that it is in hexadecimal. These addresses may change from
machine to machine.
Commentaires sur ces manuels