Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Parallel port
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Computer interface}} {{redirect|LPT}} {{redirect|Printer port}} {{About|the Centronics style port|the concept in general|Parallel communications}} <!-- NB. Left here to maintain link continuity for now. Should be removed at a later stage, as the term "LPT" either refers to "line printers", or to logical device names in operating systems such as DOS, but not to the parallel port hardware in PCs, and therefore this article is NOT the primary topic of "LPT". --> {{infobox connector | name = Parallel port | type = Point-to-point | image = [[File:Parallel computer printer port.jpg|frameless|150px]] | logo = | caption = A [[DB-25]] connector often used for a parallel printer port on [[IBM PC compatible]] computers, with the printer icon. | designer = [[#Centronics|Centronics]], [[IBM]] | design_date = 1970–1981 | manufacturer = Centronics, Dataproducts, Intel, IBM, Compaq, Nortel, etc | key_people = | production_date = | superseded = | superseded_by = | superseded_by_date = | external = Yes | hotplug = Usually not | length = {{convert|2.3|cm|abbr=on}} | width = | height = | electrical = 0 to +5.0 volt [[direct current|DC]] | earth = Dedicated pins | maximum_voltage = 5 volts DC | maximum_current = | data_signal = [[Parallel communication|Parallel]] | data_bit_width = Variable | data_bandwidth = '''PP:''' 150 [[kB/s]],<ref name="James">James, Kevin. ''PC interfacing and data acquisition : techniques for measurement, instrumentation and control''. Oxford; Boston : Newnes, 2000. {{ISBN|9780750646246}}. p. 256</ref><br/>'''EPP:''' 2 [[megabyte|MB]]/s<br/>'''ECP:''' 2.5 MB/s | data_devices = 2, unless [[Software_protection_dongle|devices provide passthrough]] | data_style = Application dependent | cable = Usually up to 25 wires including ground; optionally shielded | physical_connector = [[DB-25]], [[D-subminiature|DB25F]], [[Micro ribbon|"Centronics" 36-pin Amphenol]], [[D-subminiature|DC-37]], others | num_pins = 8 data, 4 output control, 5 input control, 8 ground | pinout_image = [[Image:25 Pin D-sub pinout.svg|200px|frameless]] | pinout_caption = IBM PC-compatible parallel port pinout }} [[File:Centronics-36F.jpg|thumb|Micro ribbon 36-pin female, such as on printers and on some computers, particularly industrial equipment and early (pre-1980s) personal computers.]] [[File:Mini-Centronics 36 pin with Micro-Centronics 36 pin.jpg|thumb|Mini-Centronics 36-pin male connector (top) with Micro ribbon 36-pin male Centronics connector (bottom)]] [[File:Apple_II_Parallel_Printer_Card.jpg|thumb|The Apple II Parallel Printer Port connected to the printer via a folded ribbon cable; one end connected to the connector at the top of the card, and the other end had a 36-pin Centronics connector.]] In [[computing]], a '''parallel port''' is a type of [[Hardware interface|interface]] found on early [[computer]]s ([[personal computer|personal]] and otherwise) for connecting [[peripheral]]s. The name refers to the way the data is sent; parallel ports send multiple [[bit]]s of data at once ([[parallel communication]]), as opposed to [[serial communication]], in which bits are sent one at a time. To do this, parallel ports require multiple data lines in their cables and [[Computer port (hardware)|port]] connectors and tend to be larger than contemporary [[serial port]]s, which only require one data line. There are many types of parallel ports, but the term has become most closely associated with the '''printer port''' or [[#Centronics|Centronics port]] found on most personal computers from the 1970s through the 2000s. It was an industry [[de facto standard|''de facto'' standard]] for many years, and was finally standardized as [[IEEE 1284]] in the late 1990s, which defined the [[Enhanced Parallel Port]] (EPP) and [[Extended Capability Port]] (ECP) bi-directional versions. Today, the parallel port interface is virtually non-existent in new computers because of the rise of [[USB|Universal Serial Bus]] (USB) devices, along with [[Print server|network printing]] using [[Ethernet]] and [[Wi-Fi]] connected printers. The parallel port interface was originally known as the '''Parallel Printer Adapter''' on IBM [[PC compatible|PC-compatible]] computers. It was primarily designed to operate [[Dot matrix printing#Personal computers|printers]] that used IBM's eight-bit [[extended ASCII]] [[character set]] to print text, but could also be used to adapt other peripherals. Graphical printers, along with a host of other devices, have been designed to communicate with the system. ==History== ===Centronics=== [[An Wang]], Robert Howard and Prentice Robinson began development of a low-cost printer at [[Centronics]], a subsidiary of [[Wang Laboratories]] that produced specialty [[computer terminal]]s. The printer used the [[dot matrix printing]] principle, with a print head consisting of a vertical row of seven metal pins connected to [[solenoid]]s. When power was applied to the solenoids, the pin was pushed forward to strike the paper and leave a dot. To make a complete character [[glyph]], the print head would receive power to specified pins to create a single vertical pattern, then the print head would move to the right by a small amount, and the process repeated. On their original design, a typical glyph was printed as a matrix seven high and five wide, while the "A" models used a print head with 9 pins and formed glyphs that were 9 by 7.<ref name=centronics306>{{cite book |url=https://archive.org/stream/bitsavers_centronicschnicalManualMar76_13986426/37400040F_Model_306_Technical_Manual_Mar76_djvu.txt |title=Centronics model 306 Technical Manual |date=1976 |publisher=Centronics}}</ref> This left the problem of sending the [[ASCII]] data to the printer. While a [[serial port]] does so with the minimum of pins and wires, it requires the device to buffer up the data as it arrives bit by bit and turn it back into multi-bit values. A parallel port makes this simpler; the entire ASCII value is presented on the pins in complete form. In addition to the eight data pins, the system also needed various control pins as well as electrical grounds. Wang happened to have a surplus stock of 20,000 [[Amphenol]] 36-pin micro ribbon connectors that were originally used for one of their early calculators. The interface only required 21 of these pins, the rest were grounded or not connected. The connector has become so closely associated with Centronics that it is now popularly known as the {{anchor|Centronics connector}} "'''Centronics connector'''".<ref name="webster"/> The [[Centronics 101|Centronics Model 101]] printer, featuring this connector, was released in 1970.<ref name="webster">{{cite book |author=Webster, Edward C. |title=Print Unchained: Fifty Years of Digital Printing: A Saga of Invention and Enterprise |publisher=DRA of Vermont |location=West Dover, VT |year=2000 |isbn=0-9702617-0-5}}</ref> The host sent ASCII characters to the printer using seven of eight data pins, pulling them high to +5V to represent a 1. When the data was ready, the host pulled the ''STROBE'' pin low, to 0 V. The printer responded by pulling the ''BUSY'' line high, printing the character, and then returning BUSY to low again. The host could then send another character. Control characters in the data caused other actions, like the <code>CR</code> or <code>EOF</code>. The host could also have the printer automatically start a new line by pulling the ''AUTOFEED'' line high, and keeping it there. The host had to carefully watch the BUSY line to ensure it did not feed data to the printer too rapidly, especially given variable-time operations like a paper feed.<ref name=centronics306/><ref name=centronics101/> The printer side of the interface quickly became an industry [[de facto standard|''de facto'' standard]], but manufacturers used various connectors on the system side, so a variety of cables were required. For example, [[NCR Corporation|NCR]] used the 36-pin [[micro ribbon]] connector on both ends of the connection, early [[VAX]] systems used a [[DC-37]] connector, [[Texas Instruments]] used a 25-pin card [[edge connector]] and [[Data General]] used a 50-pin micro ribbon connector. When [[IBM]] implemented the parallel interface on the [[IBM Personal Computer|IBM PC]], they used the [[DB-25F]] connector at the PC-end of the interface, creating the now familiar parallel cable with a DB25M at one end and a 36-pin micro ribbon connector at the other. In theory, the Centronics port could transfer data as rapidly as 75,000 characters per second. This was far faster than the printer, which averaged about 160 characters per second, meaning the port spent much of its time idle. The performance was defined by how rapidly the host could respond to the printer's BUSY signal asking for more data. To improve performance, printers began incorporating [[Data buffer|buffers]] so the host could send them data more rapidly, in bursts. This not only reduced (or eliminated) delays due to latency waiting for the next character to arrive from the host, but also freed the host to perform other operations without causing a loss of performance. Performance was further improved by using the buffer to store several lines and then printing in both directions, eliminating the delay while the print head returned to the left side of the page. Such changes more than doubled the performance of an otherwise unchanged printer, as was the case on Centronics models like the 102 and 308.<ref name=centronics101>{{cite book |url=http://chiclassiccomp.org/docs/content/computing/Centronics/101_101A_101AL_102A_306_SpecificationsInterfaceInformation.pdf |title=Centronics 101, 120A, 101AL, 102A, 306 Printers |url-status=live |archive-url=https://web.archive.org/web/20161003124447/http://chiclassiccomp.org/docs/content/computing/Centronics/101_101A_101AL_102A_306_SpecificationsInterfaceInformation.pdf |archive-date=2016-10-03 }}</ref> ===IBM=== [[IBM]] released the [[IBM Personal Computer]] in 1981 and included a variant of the Centronics interface— only IBM logo printers ([[Original equipment manufacturer|rebranded]] from [[Epson]]) could be used with the IBM PC.<ref name="durda">{{cite web |url=http://nemesis.lonestar.org/reference/computers/interfaces/centronics.html |title=Centronics and IBM Compatible Parallel Printer Interface Pin Assignment Reference |access-date=2007-10-05 |last=Durda IV |first=Frank |year=2004 |url-status=dead |archive-url=https://web.archive.org/web/20070913082745/http://nemesis.lonestar.org/reference/computers/interfaces/centronics.html |archive-date=2007-09-13 }}</ref> IBM standardized the parallel cable with a [[D-subminiature|DB25F]] connector on the PC side and the 36-pin Centronics connector on the printer side. Vendors soon released printers compatible with both standard Centronics and the IBM implementation. The original IBM parallel printer adapter for the IBM PC of 1981 was designed to support limited bidirectionality, with 8 lines of data output and 4 lines of data input.{{citation needed|date=March 2021}} This allowed the port to be used for other purposes, not just output to a printer. This was accomplished by allowing the data lines to be written to by devices on either end of the cable, which required the ports on the host to be bidirectional. This feature saw little use, and was removed in later revisions of the hardware. Years later, in 1987, IBM reintroduced the bidirectional interface with its [[IBM PS/2]] series, where it could be enabled or disabled for compatibility with applications hardwired not to expect a printer port to be bidirectional. ===Bi-Tronics=== As the printer market expanded, new types of printing mechanisms appeared. These often supported new features and error conditions that could not be represented on the existing port's relatively few status pins. While the IBM solution could support this, it was not trivial to implement and was not at that time being supported. This led to the Bi-Tronics system, introduced by [[Hewlett-Packard|HP]] on their [[HP LaserJet 4|LaserJet 4Si]] in April 1993.<ref>{{cite web |url=http://www.hp.com/hpinfo/newsroom/feature_stories/2004/printerstimeline.pdf |title=Twenty Years of Innovation: HP LaserJet and Inkjet Printers 1984–2004 |author= HP Corporate Archives |date=2004-05-24 |website=www.hp.com |publisher=HP |archive-url=https://web.archive.org/web/20071202142038/http://www.hp.com/hpinfo/newsroom/feature_stories/2004/printerstimeline.pdf |access-date=2021-11-05 |archive-date=2007-12-02 |quote=}}</ref> This used four existing status pins, ERROR, SELECT, PE and BUSY to represent a [[nibble]], using two transfers to send an 8-bit value. Bi-Tronics mode, now known as nibble mode, was indicated by the host pulling the SELECT line high, and data was transferred when the host toggles the AUTOFEED low. Other changes in the handshaking protocols improved performance, reaching 400,000 cps to the printer, and about 50,000 cps back to the host.<ref>{{cite web |title= Nibble Mode |url= http://madang.ajou.ac.kr/~ydpark/archive/computer/ppi/fapo/nibble.htm |website= Department of Chemistry, Ajou University |url-status= dead |archive-url= https://web.archive.org/web/20170406082832/http://madang.ajou.ac.kr/~ydpark/archive/computer/ppi/fapo/nibble.htm |archive-date= 2017-04-06 |access-date= 2016-10-11 }}</ref> A major advantage of the Bi-Tronics system is that it can be driven entirely in software in the host, and uses otherwise unmodified hardware - all the pins used for data transfer back to the host were already printer-to-host lines. ===EPP and ECP=== The introduction of new devices like [[Image scanner|scanner]]s and [[multi-function printer]]s demanded much more performance than either the Bi-Tronics or IBM style backchannels could handle. Two other standards have become more popular for these purposes. The Enhanced Parallel Port (EPP), originally defined by [[Zenith Electronics]], is similar to IBM's byte mode in concept, but changes details of the handshaking to allow up to 2 MB/s.<ref>{{patent|EP|0640229|Buxton, C.L. / Kohtz, R.A. / Zenith Data Systems Corp.: ''Enhanced parallel port.'' filing date 15 May 1992}}</ref> The Extended Capability Port (ECP) is essentially an entirely new port in the same physical housing that also adds [[direct memory access]] based on [[Industry Standard Architecture|ISA]] and [[run-length encoding]] to compress the data, which is especially useful when transferring simple images like [[fax]]es or black-and-white scanned images. ECP offers performance up to 2.5 MB/s in both directions.<ref name=lava>{{cite tech report |url=http://www.nor-tech.com/solutions/dox/ieee1284_parallel_ports.pdf |title=IEEE 1284: Parallel Ports |publisher=Lava |date=2002 |access-date=2 November 2007 |archive-url=https://web.archive.org/web/20060523125620/http://www.nor-tech.com/solutions/dox/ieee1284_parallel_ports.pdf |archive-date=23 May 2006 |url-status=dead |df=dmy-all }}</ref> All of these enhancements are collected as part of the [[IEEE 1284]] standard. The first release in 1994 included original Centronics mode ("compatibility mode"), nibble and byte modes, as well as a change to the handshaking that was already widely used; the original Centronics implementation called for the BUSY lead to toggle with each change on any line of data (busy-by-line), whereas IEEE 1284 calls for BUSY to toggle with each received character (busy-by-character). This reduces the number of BUSY toggles and the resulting interruptions on both sides. A 1997 update standardized the printer status codes. In 2000, the EPP and ECP modes were moved into the standard, as well as several connector and cable styles, and a method for [[Daisy chain (electrical engineering)|daisy chaining]] up to eight devices from a single port.<ref name=lava/> Some host systems or print servers may use a strobe signal with a relatively low voltage output or a fast toggle. Any of these issues might cause no or intermittent printing, missing or repeated characters or garbage printing. Some printer models may have a switch or setting to set busy by character; others may require a handshake adapter.{{citation needed|date=October 2016}} ===Dataproducts=== [[Dataproducts]] introduced a very different implementation of the parallel interface for their printers. It used a [[D-subminiature|DC-37]] connector on the host side and a 50 pin connector on the printer side—either a [[D-subminiature|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.<ref>{{cite web |url=http://www.hardwarebook.info/Dataproducts_D-Sub_50_Parallel |title=Dataproducts D-Sub 50 Parallel |access-date=2008-01-25 |work=Hardware Book |url-status=live |archive-url=https://web.archive.org/web/20071214155050/http://www.hardwarebook.info/Dataproducts_D-Sub_50_Parallel |archive-date=2007-12-14 }}</ref><ref>{{cite web |url=http://www.hardwarebook.info/Dataproducts_M/50_Parallel |title=Dataproducts M/50 Parallel |access-date=2008-01-25 |work=Hardware Book |url-status=live |archive-url=https://web.archive.org/web/20071214105905/http://www.hardwarebook.info/Dataproducts_M/50_Parallel |archive-date=2007-12-14 }}</ref> Dataproducts parallel was available in a short-line for connections up to {{convert|50|ft|m}} and a long-line version using [[differential signaling]] for connections to {{convert|500|ft|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. A wide variety of devices were eventually designed to operate on a parallel port. Most devices were uni-directional (one-way) devices, only meant to respond to information sent from the PC. However, some devices such as [[Zip drive]]s were able to operate in bi-directional mode. Printers also eventually took up the bi-directional system, allowing various status report information to be sent. ==Historical uses== [[Image:HP C4381A CD-Writer Plus 7200 Series-4077.jpg|right|thumb|''[[Hewlett-Packard|HP]] C4381A CD-Writer Plus 7200 Series'', showing parallel ports to connect between a printer and the computer.]] Before the advent of [[USB]], the parallel interface was adapted to access a number of peripheral devices other than printers. One early use of the parallel port was for [[dongle]]s used as hardware keys which were supplied with application software as a form of software copy protection. Other uses included [[optical disc drive]]s such as [[Compact disc|CD]] readers and writers, [[Zip drive]]s, [[Image scanner|scanners]], [[tape drives]],<ref>{{cite book|title=Handbook of Computer Troubleshooting|author=Michael Byrd|isbn=978-1888998993|year=2013|publisher=UNKNO }}</ref> external [[modem]]s, [[gamepad]]s, and [[joystick]]s. Some of the earliest portable [[MP3 player]]s required a parallel port connection for transferring songs to the device.<ref>{{cite web |url = http://www.targetpc.com/hardware/audio/mp3/dlink_dmp100/index2.shtml |title = The D-Link DMP-100 MP3 Player |page = 2 |last = Mitskaniouk |first = Oleg |date = 2000-06-19 |publisher = Target PC Magazine |access-date = 2012-07-20 |url-status = live |archive-url = https://web.archive.org/web/20150501140844/http://www.targetpc.com/hardware/audio/mp3/dlink_dmp100/index2.shtml |archive-date = 2015-05-01 }}</ref> 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. ===Interfaces=== Most PC-compatible systems in the 1980s and 1990s had one to three ports, with communication interfaces defined like this: *Logical parallel port 1: [[Memory-mapped I/O|I/O port]] 0x3BC, [[Interrupt request (PC architecture)|IRQ]] 7 (usually in monochrome graphics adapters) *Logical parallel port 2: I/O port 0x378, IRQ 7 (dedicated IO cards or using a controller built into the mainboard) *Logical parallel port 3: I/O port 0x278, IRQ 5 (dedicated IO cards or using a controller built into the mainboard) If no printer port is present at 0x3BC, the second port in the row (0x378) becomes logical parallel port 1 and 0x278 becomes logical parallel port 2 for the BIOS. Sometimes, printer ports are jumpered to share an interrupt despite having their own IO addresses (i.e. only one can be used interrupt-driven at a time). In some cases, the BIOS supports a fourth printer port as well, but the base address for it differs significantly between vendors. Since the reserved entry for a fourth logical printer port in the [[BIOS Data Area]] (BDA) is shared with other uses on PS/2 machines and with S3 compatible graphics cards, it typically requires special drivers in most environments. Under DR-DOS 7.02 the BIOS port assignments can be changed and overridden using the [[LPT1 (CONFIG.SYS directive)|LPT1]], [[LPT2 (CONFIG.SYS directive)|LPT2]], [[LPT3 (CONFIG.SYS directive)|LPT3]] (and optionally [[LPT4 (CONFIG.SYS directive)|LPT4]]) [[CONFIG.SYS]] directives. ===Access=== DOS-based systems make the logical parallel ports detected by the BIOS available under device names such as ''LPT1'', ''LPT2'' or ''LPT3'' (corresponding with logical parallel port 1, 2, and 3, respectively). These names derive from terms like '''Line Print Terminal''', '''Local Print Terminal''' (both abbreviated as '''LPT'''), or Line Printer. A similar naming convention was used on [[Incompatible Timesharing System|ITS]], [[Digital Equipment Corporation|DEC]] systems, as well as in [[CP/M]] and [[86-DOS]] (''LST''). In [[DOS]], the parallel printers could be accessed directly on the [[command line]]. For example, the command "<code>TYPE C:\AUTOEXEC.BAT > LPT1:</code>" would redirect the contents of the [[AUTOEXEC.BAT]] file to the printer port. A '''PRN''' device was also available as an alias for LPT1. Some operating systems (like [[Multiuser DOS]]) allow to change this fixed assignment by different means. Some DOS versions use resident driver extensions provided by MODE, or users can change the mapping internally via a [[CONFIG.SYS]] [[PRN (CONFIG.SYS directive)|PRN]]=n directive (as under DR-DOS 7.02 and higher). [[DR-DOS]] 7.02 also provides optional built-in support for ''LPT4'' if the underlying BIOS supports it. PRN, along with CON, AUX and a few others are invalid file and directory names in DOS and Windows, even on [[Windows XP]] and later. This set of invalid file and directory names also affects [[Windows 95]] and [[Windows 98|98]], which had an [[MS-DOS]] device in path name vulnerability in which it causes the computer to crash if the user types "C:\CON\CON", "C:\PRN\PRN" or "C:\AUX\AUX" in the Windows Explorer address bar or via the Run command.{{citation needed|date=May 2013}} [[Microsoft]] has since released a patch to fix this issue, however new installations of Windows 95 and 98 are not patched with this fix and will still have this issue. A special "<code>PRINT</code>" command also existed to achieve the same effect. [[Microsoft Windows]] still refers to the ports in this manner in many cases, though this is often fairly hidden. In [[SCO UNIX]] and [[Linux]], the first parallel port is available via the filesystem as <code>/dev/lp0</code>. Linux IDE devices can use a ''paride'' (parallel port IDE) driver.<ref> {{cite book | last1 = Barkakati | first1 = Naba | title = Linux All-in-One Desk Reference For Dummies | url = https://books.google.com/books?id=1BPAJhqtsQwC | edition = 2 | publisher = John Wiley & Sons | date = 2006 | page = 482 | isbn = 9780471793137 | access-date = 2015-09-11 | quote = Some IDE devices use a parallel port IDE adapter — that's what the PARIDE option refers to. }} </ref> == Notable consumer products == [[File:Accton-etherpocket-sp-parallel-port-ethernet-adapter.jpg|thumb|[[Accton]] Etherpocket-SP parallel port [[ethernet]] adaptor (circa 1990, [[DOS]] drivers). Supports both coax and 10 Base-T. Supplementary power is drawn from a [[PS/2 port]] passthrough cable.]] * The [[Zip drive|Iomega ZIP drive]] * The Snappy Video SnapShot video capture device<ref>{{cite web |url=https://www.cnet.com/products/play-snappy-video-snapshot-still-image-capture-adapter-series/specs/ |title=Play Snappy Video SnapShot still-image capture adapter Series Specifications |website=[[CNET]] |access-date=2017-08-06 |url-status=live |archive-url=https://web.archive.org/web/20170806181332/https://www.cnet.com/products/play-snappy-video-snapshot-still-image-capture-adapter-series/specs/ |archive-date=2017-08-06 }}</ref> * [[MS-DOS 6.22|MS-DOS 6.22's]] [[INTERLNK]] and INTERSRV drive sharing utility * The [[Covox Speech Thing]] audio device * The [[OPL2LPT]] and [[OPL3LPT]] audio devices ==Current use== For consumers, [[USB]] and [[computer network]]s have 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. Smaller machines have less room for large parallel port connectors. 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 server]]s that provide an interface to parallel ports through a network. USB-to-EPP chips can also allow other non-printer devices to continue to work on modern computers without a parallel port.<ref>{{cite web|url=http://myweb.polyu.edu.hk/~06900664r/ch341epp.htm|title=Parallel port flatbed scanner works under USB on Win9x (Archive)|access-date=2012-06-30|url-status=bot: unknown|archive-url=https://archive.today/20120630214557/http://myweb.polyu.edu.hk/~06900664r/ch341epp.htm|archive-date=2012-06-30}}</ref> 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), 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 LPT without additional software (kernel extensions).<ref>{{cite web |url=http://www.logix4u.net/parallel-port/16-inpout32dll-for-windows-982000ntxp |title=Inpout32.DLL for Windows 98/2000/NT/XP |access-date=2014-03-14 |url-status=dead |archive-url=https://web.archive.org/web/20140314200553/http://www.logix4u.net/parallel-port/16-inpout32dll-for-windows-982000ntxp |archive-date=2014-03-14 }}</ref> [[Milling (machining)|CNC Milling Machines]] also often make use of the parallel port to directly control the machine's motors and attachments, especially with [[LinuxCNC]] OS. ==IBM PC implementation== === 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). {| class="wikitable" |- ! <small>PORT NO</small> !! <small>[[Interrupt]] #</small> !! <small>Starting [[I/O Address|I/O]]</small> !! <small>Ending [[I/O Address|I/O]]</small> |- | <code>#1</code> || <code>[[Interrupt Request|IRQ]] 7</code> || <code>0x3BC</code><ref name="Gilluwe_1994"/> || <code>0x3BF</code> |- | <code>#2</code> || <code>[[Interrupt Request|IRQ]] 7</code> || <code>0x378</code><ref name="Gilluwe_1994"/> || <code>0x37F</code> |- | <code>#3</code> || <code>[[Interrupt Request|IRQ]] 5</code> || <code>0x278</code><ref name="Gilluwe_1994"/> || <code>0x27F</code> |} If there is an unused 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 the first logical parallel port.)<ref name="Gilluwe_1994">Frank Van Gilluwe, The Undocumented PC, 1994, page 703, {{ISBN|0-201-62277-7}}</ref> 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 the first logical parallel port (and therefore also for the corresponding LPT1 DOS device driver) 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 slot can be determined by reading the [[BIOS Data Area]] (BDA) at 0000h:0408h. Bit-to-pin mapping for the Standard Parallel Port (SPP): {| class="wikitable" |- ! <small>Address</small> !! !! <small> [[Most significant bit|MSB]] </small> !! !! !! !! !! !! !! <small>[[Least significant bit|LSB]]</small> |- | || Bit: || 7 || 6 || 5 || 4 || 3 || 2 || 1 || 0 |- | <code>Base (Data port)</code> || Pin: || 9 || 8 || 7 || 6 || 5 || 4 || 3 || 2 |- | <code>Base+1 (Status port)</code> || Pin: || ~11 || 10 || 12 || 13 || 15 || || || |- | <code>Base+2 (Control port)</code> || Pin: || || || || || ~17 || 16 || ~14 || ~1 |} ~ indicates a hardware inversion of the bit. === Program interface === In versions of [[Microsoft Windows|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 (operating system)|Solaris]], [[386BSD]], etc.), the microprocessor is operated in a different security ring, and access to the parallel port is prohibited, 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== The older parallel printer ports had an 8-bit data bus and four pins for control output (Strobe, Linefeed, Initialize, and Select In), and five more for control input (ACK, Busy, Select, Error, and Paper Out). Its data transfer speed is at 150 kB/s.<ref name="James">James, Kevin. ''PC interfacing and data acquisition : techniques for measurement, instrumentation and control''. Oxford; Boston : Newnes, 2000. {{ISBN|9780750646246}}. p. 256</ref> It is possible for a parallel port to have a speed of 300 KB/s.<ref>{{cite book | url=https://books.google.com/books?id=kG8LcWfruOAC&dq=parallel+port++speed+300+kb/s&pg=PA675 | title=PC Hardware in a Nutshell: A Desktop Quick Reference | isbn=978-0-596-55234-3 | last1=Thompson | first1=Robert Bruce | last2=Thompson | first2=Barbara Fritchman | date=24 July 2003 | publisher="O'Reilly Media, Inc." }}</ref> The newer EPPs (Enhanced Parallel Ports) have an 8-bit data bus, and the same control pins as the normal parallel printer port. Newer ports reach speeds of up to 2 MB/s.<ref>[http://www.techopedia.com/definition/3658/parallel-port Parallel Port Definition] {{webarchive|url=https://web.archive.org/web/20130103055347/http://www.techopedia.com/definition/3658/parallel-port |date=2013-01-03 }}, Techopedia</ref>{{better source needed|date=February 2019}} [[Pinout]]s for parallel port connectors are: [[File:Parallel port pinouts.svg|thumb|350px|[[Pinout]]s for parallel port connectors.]] {| class="wikitable" |- ! 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.{{Dubious|Pin 25 not connected?|reason=Pin 25 should not be unconnected, this would probably be due to a wiring error only.|date=October 2015}} ==See also== * [[Device file]] * [[Serial port]] * [[Parallel communication]] * [[IEEE 1284]], better known as "Enhanced Parallel Port" Hardware IC chips: * For host computer, see [[Super I/O]] * For peripheral side, example parallel port interface chips: PPC34C60 (SMSC) and W91284PIC (Warp Nine) * For USB-printer purpose, example USB chips: PL-2305 (Prolific) and CH341 (QinHeng) == References == {{reflist}} {{refbegin}} * [[Jan Axelson|Axelson, Jan]] (2000). ''Parallel Port Complete''. [http://www.janaxelson.com/parport.htm Jan Axelson's Lakeview Research]. {{ISBN|0-9650819-1-5}}. * [http://kernelbook.sourceforge.net/parportbook.pdf The (Linux) Parallel Port Subsystem by Tim Waugh] {{Webarchive|url=https://web.archive.org/web/20200909022602/http://kernelbook.sourceforge.net/parportbook.pdf |date=2020-09-09 }} {{refend}} == External links== {{commons category}} * Parallel Port (from ''BeyondLogic.org'') [https://web.archive.org/web/20120301022928/http://retired.beyondlogic.org/spp/parallel.pdf standard], [https://web.archive.org/web/20120306000230/http://retired.beyondlogic.org/epp/epp.pdf enhanced (EPP)], [https://web.archive.org/web/20120305192341/http://retired.beyondlogic.org/ecp/ecp.pdf extended (ECP)], [http://retired.beyondlogic.org/parlcd/parlcd.pdf examples]{{dead link|date=March 2018 |bot=InternetArchiveBot |fix-attempted=yes }} * [https://web.archive.org/web/20090503071916/http://electra.altervista.org/ EPP parallel printer port data capture project] * [http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html Linux I/O port programming mini-HOWTO] * [http://people.redhat.com/twaugh/parport/html/parportguide.html The Linux 2.4 Parallel Port Subsystem] {{Webarchive|url=https://web.archive.org/web/20210211010418/http://people.redhat.com/twaugh/parport/html/parportguide.html |date=2021-02-11 }} * [https://web.archive.org/web/20081031213301/http://logix4u.net/Legacy_Ports/Parallel_Port/A_tutorial_on_Parallel_port_Interfacing.html Parallel Port interfacing with Windows NT/2000/XP] * [https://archive.org/details/parallelportcomp0000axel <!-- quote=parallel port history. --> Parallel port complete: programming, interfacing & using the PC's parallel printer port] * [https://web.archive.org/web/20101124173622/http://pyserial.sourceforge.net/pyparallel.html PyParallel] - API for Python programming language * [http://people.redhat.com/twaugh/parport/html/parportguide.html Linux ppdev reference] {{Webarchive|url=https://web.archive.org/web/20210211010418/http://people.redhat.com/twaugh/parport/html/parportguide.html |date=2021-02-11 }} * [http://cyberelk.net/tim/software/libieee1284/ libieee1284 homepage] * [http://msdn.microsoft.com/en-us/library/windows/hardware/ff544788%28v=VS.85%29.aspx MSDN: Roadmap for Developing Parallel Device Drivers] {{Basic computer components}} [[Category:Computer buses]] [[Category:Physical layer protocols]] [[Category:Legacy hardware]] [[Category:Computer connectors]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:About
(
edit
)
Template:Anchor
(
edit
)
Template:Basic computer components
(
edit
)
Template:Better source needed
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite tech report
(
edit
)
Template:Cite web
(
edit
)
Template:Commons category
(
edit
)
Template:Convert
(
edit
)
Template:Dead link
(
edit
)
Template:Dubious
(
edit
)
Template:ISBN
(
edit
)
Template:Infobox connector
(
edit
)
Template:Patent
(
edit
)
Template:Redirect
(
edit
)
Template:Refbegin
(
edit
)
Template:Refend
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Webarchive
(
edit
)