PARALLEL PORT
Parallel port is the mostly used for interfacing line printers. It was introduced by IBM in early 1980′s. Earlier there was no standard defined for parallel port interfacing. Every company has their own standards for interfacing parallel port. Then came the IEEE 1284 standard (Standard Signaling Method for bi-directional parallel peripheral interface for personal computers).
There are three base addresses defined for parallel port which can be used for interfacing parallel port. Those addresses are
0×378-0x37A
0×278-0x27A
0x3BC-0x3BF
A parallel port is a 25 pin connector having 8 data pins, 5 status pins and 4 control pins and rest of the pins are connected to ground.
2 – 9 = 8 Data Pins
10,11,12,13,15 = Status Pins
1, 14, 16,17 = Control Pins
18 – 25 = Ground Pins
This port will allow the input of up to 9 bits or the output of 12 bits at any one given time.
There are 5 data transfer mode in parallel communication:
-
Compatibility Mode: Data can be transferred only in one direction using data register.
-
Nibble mode: Data can be transferred in both direction in half-duplex manner (only four bit at a time).
-
Byte Mode: 8bit data can be transferred in both direction in half-duplex manner.
-
EPP Mode.
-
ECP Mode.
Compatibility, Nibble & Byte modes use just the standard hardware available on the original Parallel Port cards while EPP & ECP modes require additional hardware which can run at faster speeds, while still being compatible with the Standard Parallel Port.
Compatibility Mode:
This mode defines the protocol used by most PCs to transfer data to a printer. It is commonly called the Centronics mode and is the method utilized with the standard parallel port. In this mode, data is placed on the port’s data lines, the printer status is checked for that it is not Busy, and then a data Strobe is generated by the software to send the data to the printer
Compatibility Mode steps:
-
Write the data to the data register
-
Program reads the status register to check that the printer is not BUSY
-
If not BUSY, then Write to the Control Register to assert the STROBE line
-
Write to the Control register to de-assert the STROBE line
To transfer one byte of data it requires four operation and at least as many additional instructions. The data transfer rate in this protocol is 150K bytes per second. This mode is for the forward channel only. This mode was included as a way to provide backward compatibility with the huge base of installed printers and peripherals. The other modes are used to provide the reverse channel and high performance communication links. Many of the integrated 1284 I/O controllers have implemented a mode that uses a FIFO buffer to transfer data with the Compatibility mode protocol. This mode is referred to as Fast Centronics or Parallel Port FIFO Mode. When this mode is enabled, data written to the FIFO port will be transferred to the printer using hardware generated strobes for the handshaking.