An Introduction to parallel port
A parallel interface for connecting an external device. Parallel port is basically used to transfer data parallely . 8 bits of data is transmitted at a time in parallel port.On PCs, the parallel port uses a 25-pin connector (type DB-25) and is used to connect printers, computers and other devices that need relatively high bandwidth. It is often called a Centronics interface after the company that designed the original standard for parallel communication between a computer and printer. (The modern parallel interface is based on a design by Epson.) A newer type of parallel port, which supports the same connectors as the Centronics interface, is the EPP (Enhanced Parallel Port) or ECP (Extended Capabilities Port). Both of these parallel ports support bi-directional communication and transfer rates ten times as fast as the Centronics port.
There are 5 modes of transferring data using parallel port :-
1- compatibility mode or centronic mode
2- nibble mode
3-byte mode
4-ECP mode
5- EPP mode
compatibility mode :- The Centronics interface is a standard input/output (I/O) interface designed in the 1970s for connecting printers and other devices. It was developed by the Centronics printer company which is now defunct. The Centronics interface, also known as a Parallel Port, became the standard means of connecting printers to personal computers for decades.
The technology that the Centronics interface developed into included a number of incarnations of the Parallel interface including the ECP (Entended Capabilities Parallel) and EPP (Enhanced Parallel Port) versions. The technology required a 25 way connector of which up to 17 wires were used in the specification and bi-directional communications became possible in the enhanced versions like ECP and EPP.
Today, the Centronics interface has been largely replaced by the universal serial bus (USB). For the most part, many manufactures have entirely omitted the parallel interface. However, a USB-to-parallel port adapter is available for PCs without a parallel port. These can be used for parallel printers and other peripheral devices that have a parallel interface.
Nibble mode :-The Nibble mode is the most common way to get reverse channel data from a printer or peripheral. This mode is usually combined with the Compatibility mode or a proprietary forward channel mode to create a complete bi-directional channel.
All of the standard parallel ports provide 5 lines from the peripheral to the PC to be used for external status indications. Using these lines, a peripheral can send a byte of data (8-bits) by sending 2 nibbles (4-bits) of information to the PC in two data transfer cycles. Unfortunately, since the nACK line is generally used to provide a peripheral interrupt, the bits used to transfer a nibble are not conveniently packed into the byte defined by the Status register. For this reason, the software must read the status byte and then manipulate the bits in order to get a correct byte.
1. Host signals ability to take data by asserting HostBusy low
2. Peripheral responds by placing first nibble on status lines
3. Peripheral signals valid nibble by asserting PtrClk low
4. Host sets HostBusy high to indicate that it has received the nibble and is not yet ready for another nibble.
5. Peripheral sets PtrClk high to acknowledge host
6. States 1 through 5 repeat for the second nibble.