Jump to content

Parallel port

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 129.210.115.16 (talk) at 02:59, 14 October 2012 (Current use). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

DB-25 parallel printer port, as on IBM-PC style, and a few other types of computers.
Micro ribbon 36 pin female, such as on printers and on some computers, particularly industrial equipment and early (pre-1980s) personal computers.

A parallel port is a type of interface found on computers (personal and otherwise) for connecting 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.

History

The Centronics Model 101 printer was introduced in 1970 and included the first parallel interface for printers.[1] 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.[2][3] Dataproducts parallel was available in a short-line for connections up to 50 feet (15 m) and a long-line version for connections from 50 feet (15 m) to 500 feet (150 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.[4] 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.

Historical uses

Before the advent of USB, 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 dongles used as a hardware key form of software copy protection. Zip drives and scanners were early implementations followed by external modems, sound cards, webcams, gamepads, joysticks, external hard disk drives and CD-ROM drives. Some of the earliest portable MP3 players required a parallel port connection for transferring songs to the device.[5] 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.

Current use

For consumers, the USB interface — and sometimes Ethernet — has replaced the parallel printer port, for connections both to printers and to other devices.

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.[6] USB-to-parallel adapters are available that can make parallel-only printers work with USB-only systems. There are PCI (and PCI-express) cards that provide parallel ports. There are also some print servers provide interface to parallel port through network. USB-to-EPP chips can also allow other non-printer device to continue work on modern computers without a parallel port.[7]

For electronics hobbyists the parallel port is still often the easiest way to connect to an external circuit board. It is faster than the other common legacy port (serial port) and requires no serial-to-parallel converter, and requires far less interface logic and software than a USB target interface. However, Microsoft operating systems later than Windows 95/98 prevent user programs from directly writing to or reading from the PrinterPort. Current CNC Milling Machines also often make use of the parallel port to directly control the mills motors and attachments.

Implementation on IBM personal computers

Port addresses

Traditionally IBM PC systems have allocated their first three parallel ports according to the configuration in the table below (if all three printer ports exist).

PORT NAME Interrupt # Starting I/O Ending I/O
LPT1 IRQ 7 0x3BC[8] 0x3BF
LPT2 IRQ 7 0x378[8] 0x37F
LPT3 IRQ 5 0x278[8] 0x27F

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.)[8] The base address 0x3BC is typically supported by printer ports on MDA and Hercules display adapters, whereas printer ports provided by the mainboard chipset or add-on cards rarely allow to be configured to this base address. Therefore, in absence of a monochrome display adapter, a common assignment for LPT1 today is 0x378, even though the default is still 0x3BC (and would be selected by the BIOS if it detects a printer port at this address). The IRQ lines are typically configurable in the hardware as well. Assigning the same interrupt to more than one printer port should be avoided and will typically cause one of the corresponding ports to work in polled mode only. 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 LSB
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 Windows 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.

Pinouts

Pinouts for parallel port connectors are:

Pinouts for parallel port connectors.
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 are not 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 nibbles 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.

See also

Hardware IC chips:

  • For host computer, see Super I/O
  • For peripheral side, parallel port interface chips: PPC34C60 (SMSC) and W91284PIC (Warp Nine)
  • For USB-printer purpose, example USB chips: PL-2305 (Prolific) and CH341 (QinHeng)

References

  1. ^ Webster, Edward C. (2000). Print Unchained: Fifty Years of Digital Printing: A Saga of Invention and Enterprise. West Dover, VT: DRA of Vermont. ISBN 0-9702617-0-5.
  2. ^ "Dataproducts D-Sub 50 Parallel". Hardware Book. Retrieved 2008-01-25.
  3. ^ "Dataproducts M/50 Parallel". Hardware Book. Retrieved 2008-01-25.
  4. ^ Durda IV, Frank (2004). "Centronics and IBM Compatible Parallel Printer Interface Pin Assignment Reference". Retrieved 2007-10-05.
  5. ^ Mitskaniouk, Oleg (2000-06-19). "The D-Link DMP-100 MP3 Player". Target PC Magazine. p. 2. Retrieved 2012-07-20.
  6. ^ "Microsoft Windows Logo Program System and Device Requirements".
  7. ^ Parallel port flatbed scanner works under USB on Win9x
  8. ^ a b c d Frank Van Gilluwe, The Undocumented PC, 1994, page 703, ISBN 0-201-62277-7