Parallel port
Encyclopedia
A parallel port is a type of interface found on computers (personal
and otherwise) for connecting various peripherals. In computing
, a parallel port is a parallel communication physical interface. It is also known as a printer port or Centronics port. The IEEE 1284
standard defines the bi-directional version of the port, which allows the transmission and reception of data bits at the same time.
Model 101 printer was introduced in 1970 and included the first parallel interface for printers. The interface was developed by Robert Howard and Prentice Robinson at Centronics
. The Centronics parallel interface quickly became a de facto
industry standard; manufacturers of the time tended to use various connectors on the system side, so a variety of cables were required. For example, early VAX
systems used a DC-37
connector, NCR
used the 36-pin micro ribbon connector, Texas Instruments
used a 25-pin card edge connector
and Data General
used a 50-pin micro ribbon connector.
Dataproducts
introduced a very different implementation of the parallel interface for their printers. It used a DC-37
connector on the host side and a 50 pin connector on the printer side—either a DD-50
(sometimes incorrectly referred to as a "DB50") or the block shaped M-50 connector; the M-50 was also referred to as Winchester. Dataproducts parallel was available in a short-line for connections up to 50 feet (15.2 m) and a long-line version for connections from 50 feet (15.2 m) to 500 feet (152.4 m). The Dataproducts interface was found on many mainframe systems up through the 1990s, and many printer manufacturers offered the Dataproducts interface as an option.
IBM
released the IBM Personal Computer in 1981 and included a variant of the Centronics interface— only IBM logo printers (rebranded
from Epson) could be used with the IBM PC. IBM standardized the parallel cable with a DB25F
connector on the PC side and the Centronics connector on the printer side. Vendors soon released printers compatible with both standard Centronics and the IBM implementation.
IBM implemented an early form of bidirectional interface in 1987. HP
introduced their version of bidirectional, known as Bitronics, on the LaserJet 4
in 1992. The Bitronics and Centronics interfaces were superseded by the IEEE 1284
standard in 1994.
, the parallel interface was adapted to access a number of peripheral devices other than printers. Probably one of the earliest devices to use parallel were dongle
s used as a hardware key form of software copy protection. Zip drives and scanners
were early implementations followed by external modem
s, sound card
s, webcam
s, gamepad
s, joystick
s, external hard disk drives and CD-ROM
drives. Adapters were available to run SCSI
devices via parallel. Other devices such as EPROM
programmers and hardware controllers could be connected via the parallel port.
interface—and often Ethernet
—has effectively replaced the parallel printer port. Many manufacturers of personal computers and laptops consider parallel to be a legacy port
and no longer include the parallel interface. The guidelines for Microsoft's Windows Logo Program "strongly discourages" systems builders from including parallel ports. USB-to-parallel adapters are available that can make parallel-only printers work with USB-only systems.
If there is an unused LPTx slot, the port addresses of the others are moved up. (For example, if a port at 0x3bc does not exist, the port at 0x378 will then become LPT1.) The IRQ lines, however, remain fixed (therefore, 0x378 at LPT1 would use IRQ 7). The port addresses assigned to each LPTx slot can be determined by reading the BIOS Data Area (BDA) at 0000:0408.
Bit to Pin Mapping for the Standard Parallel Port (SPP):
~ indicates a hardware inversion of the bit.
that did not use the Windows NT
kernel (as well as DOS
and some other operating systems), programs could access the parallel port with simple outportb and inportb subroutine commands. In operating systems such as Windows NT
and Unix
(NetBSD
, FreeBSD
, Solaris, 386BSD
, etc.), the microprocessor is operated in a different security ring, and access to the parallel port is inhibited, unless using the required driver. This improves security and arbitration of device contention. On Linux, inb and outb can be used when a process is run as root and an ioperm command is used to allow access to its base address
; alternatively, ppdev allows shared access and can be used from userspace if the appropriate permissions are set.
The cross-platform library for parallel port access, libieee1284, also is available on many Linux distributions and provides an abstract interface to the parallel ports of the system. Access is handled in an open-claim-release-close sequence, which allows for concurrent access in userspace.
s for parallel port connectors are:
Inverted lines are true on logic low. If they aren't inverted, then logic high is true.
Pin 25 on the DB25 connector might not be connected to Ground on modern computers.
s which were fed in sequentially through the status lines. Each pair of nibbles was then re-combined into an 8-bit byte. This same method (with the splitting and recombining done in software) was also used to transfer data between PCs using a laplink cable
.
Hardware IC chips:
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...
and otherwise) for connecting various peripherals. In computing
Computing
Computing is usually defined as the activity of using and improving computer hardware and software. It is the computer-specific part of information technology...
, a parallel port is a parallel communication physical interface. It is also known as a printer port or Centronics port. The IEEE 1284
IEEE 1284
IEEE 1284 is a standard that defines bi-directional parallel communications between computers and other devices.-History:In the 1970s, Centronics developed the now-familiar printer parallel port that soon became a de facto standard...
standard defines the bi-directional version of the port, which allows the transmission and reception of data bits at the same time.
History
The CentronicsCentronics
Centronics Data Computer Corporation was a pioneering American manufacturer of computer printers, now remembered primarily for the parallel interface that bears its name.-The beginning:Centronics began as a division of Wang Laboratories...
Model 101 printer was introduced in 1970 and included the first parallel interface for printers. The interface was developed by Robert Howard and Prentice Robinson at Centronics
Centronics
Centronics Data Computer Corporation was a pioneering American manufacturer of computer printers, now remembered primarily for the parallel interface that bears its name.-The beginning:Centronics began as a division of Wang Laboratories...
. The Centronics parallel interface quickly became a de facto
De facto
De facto is a Latin expression that means "concerning fact." In law, it often means "in practice but not necessarily ordained by law" or "in practice or actuality, but not officially established." It is commonly used in contrast to de jure when referring to matters of law, governance, or...
industry standard; manufacturers of the time tended to use various connectors on the system side, so a variety of cables were required. For example, early VAX
VAX
VAX was an instruction set architecture developed by Digital Equipment Corporation in the mid-1970s. A 32-bit complex instruction set computer ISA, it was designed to extend or replace DEC's various Programmed Data Processor ISAs...
systems used a DC-37
D-subminiature
The D-subminiature or D-sub is a common type of electrical connector. They are named for their characteristic D-shaped metal shield. When they were introduced, D-subs were among the smaller connectors used on computer systems....
connector, NCR
NCR Corporation
NCR Corporation is an American technology company specializing in kiosk products for the retail, financial, travel, healthcare, food service, entertainment, gaming and public sector industries. Its main products are self-service kiosks, point-of-sale terminals, automated teller machines, check...
used the 36-pin micro ribbon connector, Texas Instruments
Texas Instruments
Texas Instruments Inc. , widely known as TI, is an American company based in Dallas, Texas, United States, which develops and commercializes semiconductor and computer technology...
used a 25-pin card edge connector
Edge connector
An edge connector is the portion of a printed circuit board consisting of traces leading to the edge of the board that are intended to plug into a matching socket. The edge connector is a money-saving device because it only requires a single discrete female connector , and they also tend to be...
and Data General
Data General
Data General was one of the first minicomputer firms from the late 1960s. Three of the four founders were former employees of Digital Equipment Corporation. Their first product, the Data General Nova, was a 16-bit minicomputer...
used a 50-pin micro ribbon connector.
Dataproducts
Dataproducts
Dataproducts Corporation was an early manufacturer of computer peripheral equipment.Initially known as Data Products, the company was founded by Erwin Tomash in 1962 in order to take controlling interest of Telex's Data Systems Division. The division was behind on a contract to deliver disk files...
introduced a very different implementation of the parallel interface for their printers. It used a DC-37
D-subminiature
The D-subminiature or D-sub is a common type of electrical connector. They are named for their characteristic D-shaped metal shield. When they were introduced, D-subs were among the smaller connectors used on computer systems....
connector on the host side and a 50 pin connector on the printer side—either a DD-50
D-subminiature
The D-subminiature or D-sub is a common type of electrical connector. They are named for their characteristic D-shaped metal shield. When they were introduced, D-subs were among the smaller connectors used on computer systems....
(sometimes incorrectly referred to as a "DB50") or the block shaped M-50 connector; the M-50 was also referred to as Winchester. Dataproducts parallel was available in a short-line for connections up to 50 feet (15.2 m) and a long-line version for connections from 50 feet (15.2 m) to 500 feet (152.4 m). The Dataproducts interface was found on many mainframe systems up through the 1990s, and many printer manufacturers offered the Dataproducts interface as an option.
IBM
IBM
International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...
released the IBM Personal Computer in 1981 and included a variant of the Centronics interface— only IBM logo printers (rebranded
Original Equipment Manufacturer
An original equipment manufacturer, or OEM, manufactures products or components that are purchased by a company and retailed under that purchasing company's brand name. OEM refers to the company that originally manufactured the product. When referring to automotive parts, OEM designates a...
from Epson) could be used with the IBM PC. IBM standardized the parallel cable with a DB25F
D-subminiature
The D-subminiature or D-sub is a common type of electrical connector. They are named for their characteristic D-shaped metal shield. When they were introduced, D-subs were among the smaller connectors used on computer systems....
connector on the PC side and the Centronics connector on the printer side. Vendors soon released printers compatible with both standard Centronics and the IBM implementation.
IBM implemented an early form of bidirectional interface in 1987. HP
Hewlett-Packard
Hewlett-Packard Company or HP is an American multinational information technology corporation headquartered in Palo Alto, California, USA that provides products, technologies, softwares, solutions and services to consumers, small- and medium-sized businesses and large enterprises, including...
introduced their version of bidirectional, known as Bitronics, on the LaserJet 4
HP LaserJet 4
The HP LaserJet 4 is a group of monochrome laser printers produced in the early to mid-1990s as part of the LaserJet series by Hewlett Packard . The 4 series has various models, including the standard LaserJet 4 for business use, the 4L for personal use and the 4P for small businesses...
in 1992. The Bitronics and Centronics interfaces were superseded by the IEEE 1284
IEEE 1284
IEEE 1284 is a standard that defines bi-directional parallel communications between computers and other devices.-History:In the 1970s, Centronics developed the now-familiar printer parallel port that soon became a de facto standard...
standard in 1994.
Uses
Before the advent of USBUniversal Serial Bus
USB is an industry standard developed in the mid-1990s that defines the cables, connectors and protocols used in a bus for connection, communication and power supply between computers and electronic devices....
, the parallel interface was adapted to access a number of peripheral devices other than printers. Probably one of the earliest devices to use parallel were dongle
Dongle
A software protection dongle is a small piece of hardware that plugs into an electrical connector on a computer and serves as an electronic "key" for a piece of software; the program will only run when the dongle is plugged in...
s used as a hardware key form of software copy protection. Zip drives and scanners
Image scanner
In computing, an image scanner—often abbreviated to just scanner—is a device that optically scans images, printed text, handwriting, or an object, and converts it to a digital image. Common examples found in offices are variations of the desktop scanner where the document is placed on a glass...
were early implementations followed by external modem
Modem
A modem is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data...
s, sound card
Sound card
A sound card is an internal computer expansion card that facilitates the input and output of audio signals to and from a computer under control of computer programs. The term sound card is also applied to external audio interfaces that use software to generate sound, as opposed to using hardware...
s, webcam
Webcam
A webcam is a video camera that feeds its images in real time to a computer or computer network, often via USB, ethernet, or Wi-Fi.Their most popular use is the establishment of video links, permitting computers to act as videophones or videoconference stations. This common use as a video camera...
s, gamepad
Gamepad
A gamepad , is a type of game controller held in two hands, where the digits are used to provide input. Gamepads generally feature a set of action buttons handled with the right thumb and a direction controller handled with the left...
s, joystick
Joystick
A joystick is an input device consisting of a stick that pivots on a base and reports its angle or direction to the device it is controlling. Joysticks, also known as 'control columns', are the principal control in the cockpit of many civilian and military aircraft, either as a center stick or...
s, external hard disk drives and CD-ROM
CD-ROM
A CD-ROM is a pre-pressed compact disc that contains data accessible to, but not writable by, a computer for data storage and music playback. The 1985 “Yellow Book” standard developed by Sony and Philips adapted the format to hold any form of binary data....
drives. Adapters were available to run SCSI
SCSI
Small Computer System Interface is a set of standards for physically connecting and transferring data between computers and peripheral devices. The SCSI standards define commands, protocols, and electrical and optical interfaces. SCSI is most commonly used for hard disks and tape drives, but it...
devices via parallel. Other devices such as EPROM
EPROM
An EPROM , or erasable programmable read only memory, is a type of memory chip that retains its data when its power supply is switched off. In other words, it is non-volatile. It is an array of floating-gate transistors individually programmed by an electronic device that supplies higher voltages...
programmers and hardware controllers could be connected via the parallel port.
Current use
For consumers, the USBUniversal Serial Bus
USB is an industry standard developed in the mid-1990s that defines the cables, connectors and protocols used in a bus for connection, communication and power supply between computers and electronic devices....
interface—and often Ethernet
Ethernet
Ethernet is a family of computer networking technologies for local area networks commercially introduced in 1980. Standardized in IEEE 802.3, Ethernet has largely replaced competing wired LAN technologies....
—has effectively replaced the parallel printer port. Many manufacturers of personal computers and laptops consider parallel to be a legacy port
Legacy port
A legacy port is a computer port or connector that is considered fully or partially superseded. The replacement ports usually provide the functionality of the legacy ports with higher speeds, more compact design, or plug and play and hot swap for greater ease of use; special USB adapters are often...
and no longer include the parallel interface. The guidelines for Microsoft's Windows Logo Program "strongly discourages" systems builders from including parallel ports. USB-to-parallel adapters are available that can make parallel-only printers work with USB-only systems.
Port addresses
Traditionally IBM PC systems have allocated their first three parallel ports according to the configuration in the table below.PORT NAME | Interrupt Interrupt In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution.... # | Starting I/O | Ending I/O |
---|---|---|---|
LPT1 |
IRQ |
0x378 |
0x37f |
LPT2 |
IRQ |
0x278 |
0x27f |
LPT3 |
IRQ |
0x3bc |
0x3bf |
If there is an unused LPTx slot, the port addresses of the others are moved up. (For example, if a port at 0x3bc does not exist, the port at 0x378 will then become LPT1.) The IRQ lines, however, remain fixed (therefore, 0x378 at LPT1 would use IRQ 7). The port addresses assigned to each LPTx slot can be determined by reading the BIOS Data Area (BDA) at 0000:0408.
Bit to Pin Mapping for the Standard Parallel Port (SPP):
Address | MSB Most significant bit In computing, the most significant bit is the bit position in a binary number having the greatest value... | LSB Least significant bit In computing, the least significant bit is the bit position in a binary integer giving the units value, that is, determining whether the number is even or odd. The lsb is sometimes referred to as the right-most bit, due to the convention in positional notation of writing less significant digits... |
|||||||
---|---|---|---|---|---|---|---|---|---|
Bit: | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
Base (Data port) |
Pin: | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 |
Base+1 (Status port) |
Pin: | ~11 | 10 | 12 | 13 | 15 | |||
Base+2 (Control port) |
Pin: | ~17 | 16 | ~14 | ~1 | ||||
~ indicates a hardware inversion of the bit.
Program interface
In versions of WindowsMicrosoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
that did not use the Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...
kernel (as well as DOS
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...
and some other operating systems), programs could access the parallel port with simple outportb and inportb subroutine commands. In operating systems such as Windows NT
Windows NT
Windows NT is a family of operating systems produced by Microsoft, the first version of which was released in July 1993. It was a powerful high-level-language-based, processor-independent, multiprocessing, multiuser operating system with features comparable to Unix. It was intended to complement...
and Unix
Unix
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs, including Ken Thompson, Dennis Ritchie, Brian Kernighan, Douglas McIlroy, and Joe Ossanna...
(NetBSD
NetBSD
NetBSD is a freely available open source version of the Berkeley Software Distribution Unix operating system. It was the second open source BSD descendant to be formally released, after 386BSD, and continues to be actively developed. The NetBSD project is primarily focused on high quality design,...
, FreeBSD
FreeBSD
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...
, Solaris, 386BSD
386BSD
386BSD, sometimes called "Jolix", was a free Unix-like operating system based on BSD, first released in 1992. It ran on PC compatible computer systems based on the Intel 80386 microprocessor...
, etc.), the microprocessor is operated in a different security ring, and access to the parallel port is inhibited, unless using the required driver. This improves security and arbitration of device contention. On Linux, inb and outb can be used when a process is run as root and an ioperm command is used to allow access to its base address
Base address
In computing, a base address is an address serving as a reference point for other addresses.In computers using relative addressing scheme, to obtain an absolute address, the relevant base address is taken and offset is added to it....
; alternatively, ppdev allows shared access and can be used from userspace if the appropriate permissions are set.
The cross-platform library for parallel port access, libieee1284, also is available on many Linux distributions and provides an abstract interface to the parallel ports of the system. Access is handled in an open-claim-release-close sequence, which allows for concurrent access in userspace.
Pinouts
PinoutPinout
In electronics, a pinout is a cross-reference between the contacts, or pins, of an electrical connector or electronic component, and their functions.- Purpose :...
s for parallel port connectors are:
Pin No (DB25) | Pin No (36 pin) | Signal name | Direction | Register - bit | Inverted |
---|---|---|---|---|---|
1 | 1 | Strobe | In/Out | Control-0 | Yes |
2 | 2 | Data0 | Out | Data-0 | No |
3 | 3 | Data1 | Out | Data-1 | No |
4 | 4 | Data2 | Out | Data-2 | No |
5 | 5 | Data3 | Out | Data-3 | No |
6 | 6 | Data4 | Out | Data-4 | No |
7 | 7 | Data5 | Out | Data-5 | No |
8 | 8 | Data6 | Out | Data-6 | No |
9 | 9 | Data7 | Out | Data-7 | No |
10 | 10 | Ack | In | Status-6 | No |
11 | 11 | Busy | In | Status-7 | Yes |
12 | 12 | Paper-Out | In | Status-5 | No |
13 | 13 | Select | In | Status-4 | No |
14 | 14 | Linefeed | In/Out | Control-1 | Yes |
15 | 32 | Error | In | Status-3 | No |
16 | 31 | Reset | In/Out | Control-2 | No |
17 | 36 | Select-Printer | In/Out | Control-3 | Yes |
18-25 | 19-30,33,17,16 | Ground | - | - | - |
Inverted lines are true on logic low. If they aren't inverted, then logic high is true.
Pin 25 on the DB25 connector might not be connected to Ground on modern computers.
Unidirectional parallel ports
In early parallel ports the data lines were unidirectional (data out only) so it was not easily possible to feed data in to the computer. However, a workaround was possible by using 4 of the 5 status lines. A circuit could be constructed to split each 8-bit byte into two 4-bit nibbleNibble
In computing, a nibble is a four-bit aggregation, or half an octet...
s which were fed in sequentially through the status lines. Each pair of nibbles was then re-combined into an 8-bit byte. This same method (with the splitting and recombining done in software) was also used to transfer data between PCs using a laplink cable
LapLink cable
A LapLink cable is a cable that allows one to connect two computers together to establish a direct cable connection. The connection is achieved via the parallel ports on the two computers. No networking hardware such as a network interface card or a modem are required...
.
See also
- Parallel communication
- IEEE 1284IEEE 1284IEEE 1284 is a standard that defines bi-directional parallel communications between computers and other devices.-History:In the 1970s, Centronics developed the now-familiar printer parallel port that soon became a de facto standard...
- LPTLPTLPT is the original, and still common, name of the parallel port interface on IBM PC-compatible computers. It was designed to operate a text printer that used IBM's 8-bit extended ASCII character set. The name derives from the fact that "line printer" was a common generic term at the time for any...
Hardware IC chips:
- Super I/OSuper I/OSuper I/O is a class of I/O controller integrated circuits that began to be used on personal computer motherboards in the late 1980s, originally as add-in cards, later embedded on the motherboards. A super I/O chip combines interfaces for a variety of low-bandwidth devices...
External links
- Interfacing to the Standard Parallel Port
- Parallel Port programming and interfacing
- Linux I/O port programming mini-HOWTO
- The Linux 2.4 Parallel Port Subsystem
- Parallel Port interfacing with Windows NT/2000/XP
- Parallel port complete: programming, interfacing & using the PC's parallel printer port
- PyParallel - API for Python programming language
- Linux ppdev reference
- libieee1284 homepage