Home > Parallel Port Central
Parallel Port Central
The PC's parallel port, including ECP, EPP, bidirectional, and IEEE-1284 modes (and other I/O ports as well).
Parallel Port Complete
Jan's Parallel Port FAQ has answers to frequently asked questions about using, interfacing, and programming the parallel port in all of its modes.
The parallel port FAQ . Basics about the parallel port and how to use it, by Zhahai Stewart. (50K)
Control and data acquisition information and projects, from Peter H. Anderson and his students. Code examples in C.
Beyond Logic has tutorials (including EPP and ECP), projects, and a debug tool with source code. From Craig Peacock.
Interfacing to the IBM-PC Parallel Printer Port. General information, plus several projects.
Tomi Engdahl's PC Hardware pages. Many links.
External Parallel Port devices and Linux. Many links and info. From Tim Waugh.
If you have a (usually old) device that sends data to a line printer, and you want to instead read the data into a PC, you have a couple of options. One is to buy or make a parallel-to-serial converter and read the data at a serial port, using a terminal emulator or software you write. LPTCAP is another approach, consisting of circuits and software for reading the data into a PC's parallel port. From Kris Heidenstrom. Also see JADTech's Silent Hawk.
A tutorial on motion control from the parallel port. From cncKITS.
Including the bidirectional (PS/2) port, extended capabilities port (ECP), and enhanced parallel port (EPP), and the IEEE-1284 standard that descibes them all.
A table showing the pinouts of all three of the commonly used parallel-port connectors, including the 25-pin D-sub, the 36-contact Centronics connector, and the new IEEE-1284C connector. (6K PDF (Acrobat) file)
Warp Nine Engineering has descriptions of the EPP, ECP, and other IEEE-1284 modes. Warp Nine's products include ECP/EPP parallel-port cards, EPP and ECP drivers, and a peripheral interface controller that provides the logic between a general-purpose microcontroller and a PC's parallel port, to enable a peripheral to support EPP and ECP modes. Also check here for the latest information on IEEE standards relating to the parallel port. And there's a link to Microsoft's document describing ECP mode. (325k, PDF file).
The title of the IEEE parallel port standard is 1284-2000 IEEE Standard Signaling Method for a Bidirectional Parallel Peripheral Interface for Personal Computers. Available from IEEE.
Standard Microsystems Corp. has preliminary versions of the daisy-chain specification and EPP BIOS, plus drivers and source code for SMC chips.
Trans Digital has a high-speed universal parallel-port product.
Winford Engineering has very handy breadboard adapters and breakout boards with DB-25 connectors.
Zanthic has inexpensive proto boards for parallel-port interfacing with EPP handshaking. Some also have a CAN interface.
To connect a parallel-port printer via USB, use a USB/parallel-printer converter, available from many sources.
To connect a USB printer to a parallel port, see LPT2USB from ePaperSign.
For other legacy parallel-port applications, see Converter From USB To Parallel from Henrik Haftmann.
The data sheets for parallel-port controller chips include timing diagrams, register assignments, and other useful details about accessing and using the new modes. PC-side chips are for use in PCs; peripheral-side chips are for use in peripherals.
AMD's Am29202 processor (PDF), for use in EPP/ECP (peripheral-side).
National Semiconductor has a variety of Super I/O chips that include an IEEE 1284-compatible parallel port with EPP and ECP modes. (PC-side)
Fairchild's 74VHC161284 Transceiver contains eight bidirectional data buffers and eleven control/status buffers to implement an IEEE-1284 Level 2 interface. Outputs on the cable side can be configured to be either open drain or push-pull.
Standard Microsystems Corp., (SMSC), another manufacturer of EPP/ECP parallel-port chips. (PC- and peripheral-side).
Exar/Startech's ST78C34 and ST78C36 are EPP/ECP chips. Look under Products/Communications/General Purpose. (PC-side).
Texas Instruments' TL16PIR552 includes a PC-side ECP+EPP, plus a dual UART and IrDa interface.
Warp Nine's W91284PIC supports all modes, plus daisy-chaining and negotiating. (peripheral-side).
NFPT (No-Frills Parallel Transfer) includes a DOS program with source code and instructions for building an ECP test cable for transferring files between two PCs using ECP mode. From Kein-Hong Man.
Denis Kondakov has figured out how to do Direct Cable Connection ECP transfers between PCs using a simple, home-brewed cable configuration. It requires a patch to paralink.vxd (zip file, 36k).
Parallel Technologies' Universal Cable contains active circuits for high-speed parallel-port communications using Windows 95/98's Direct Cable Connection. Parallel Port Development Kits are available as well.
Trans Digital's Universal Parallel Port is a high-speed, long-distance link between parallel-port peripherals and a PC-ard (PCMCIA) slot.
If you want to connect your parallel printer to a USB port, USBGear has a True-Bi Directional USB Printer Cable adapter (USBG-1284Bi) that claims to support bidirectional printer communications. (Most other adapters don't.)
Para14.zip. Parallel-port diagnostic and information utility from Parallel Technologies. (88K)
PortMon for Windows monitors and displays all serial and parallel port activity on a system. From Mark Russinovich.
JadTech's Silent Hawk products non-obtrusively capture parallel-port data. The Silent Hawk III Model 1284 functions as a protocol analzyer.
QualityLogic has a protocol analyzer and test suite for IEEE-1284 links as well as a variety of products for printer testing.
Connecting two PCs via their parallel ports requires a special cable. For software, you can use Windows 95/98's Direct Cable Connection, a third-party product, or write your own program to do the transfers. To find out about Direct Cable Connection, click F1 on the desktop and search for Direct Cable Connection.
The Connect Pages have information on how to connect two PCs running various combinations of operating systems, using serial and parallel ports. From Kime.Net.
Sewell Development's Fast Lynx works with everything from DOS through Windows XP.
Also see the information under Cables.
Most USB/parallel-port converters are for connecting a parallel-port printer to a PC's USB port. The LPT2USB enables connecting a USB printer to a PC's parallel port. From ePaperSign.
Knowledge Base has printer-related articles. These are just a few:
HOWTO: Send Raw Data to a Printer Using the Win32 API from Visual Basic. Article ID: 154078.
HOWTO: Use PASSTHROUGH Escape to Send Data Directly to Printer. Article ID: 96795.
HOWTO: Get the Status of a Printer and a Print Job. Article ID: 160129.
Projects that use the parallel port or an I/O chip like the 8255 Parallel Peripheral Interface chip.
PIC 18F4550 Based Project (Parallel to Serial converter). Captures parallel printer port data and redirects it to USB (serial port emulation) using a PIC 18F4550. From Sandro Bureca.
How to connect an IDE disk to a microcontroller using an 8255. by Peter Faasse. I've included this one because of many requests for info about IDE interfacing.
GKDesign's Universal IR Controller for a PC includes source code and a circuit for reading and sending infrared remote-control signals via the parallel port.
There are various ways for applications to access the parallel port and other I/O ports in PCs, including directly accessing port addresses, communicating with a driver that accessing port addresses and using Windows' built-in drivers.
Under Windows 3.x/95/98/Me, applications can read and write directly to port addresses. Use your compiler's built-in functions (inp and out or similar) or in-line assembly code. (See the source code in my inpout32.zip below for an example.) This method is simple, but it's slow, it can't protect the port from access by other applications, and it doesn't work at all under Windows NT/2000/Xp. If you use Visual Basic or another language that doesn't have functions for port I/O or allow in-line assembly code, you can use a DLL or a custom control that adds port I/O functions to an application.
A system-level device driver enables faster port access and can manage access by multiple applications. Driver types include VxD (virtual device driver) for Windows 9x/Me, WDM for Windows 98/NT/2000/Me/Xp, and kernel-mode driver for Windows NT/2000/Xp. Hardware interrupts must use a system-level driver under Windows 9x/NT/2000/Me/Xp. If you don't want to write your own driver, there are custom controls and other tools that enable applications to access ports and respond to interrupts via a driver.
A third way to access ports is to use the drivers included with Windows. Windows 3.x/9x/NT have no functions for generic port access, only functions tied to specific uses. For example, there are API calls for accessing printers and for accessing serial ports controlled by UARTs. In Visual Basic, the Printer object and MSComm control are other options for parallel and serial-port access. Built-in functions and controls like these are usually the best solution when their abilities match what you're trying to accomplish.
Windows 2000/Xp add improved drivers for accessing parallel-port devices with support for SPP, PS/2 (Byte), EPP, and ECP modes and daisy-chaining. Parclass is a system class driver for parallel-port devices, and Parport is a system function driver for the parallel port. The Windows DDK has details. Search for Parallel Devices and Drivers in the documentation index.
Below are links to tools that you can use for port access. I've grouped them according to which operating systems they're supported in. The list includes freeware, shareware, and commercial products.
Inpout32.dll is compatible with my Win9x inpout32.dll (below) but works under all Windows editions from Win95 forward. Download Just the binaries and libs requred to integrate with your own program. The file includes both 32- and 64-bit versions. Freeware. A big thank you to LOGIX4U for coming up with this and making it available. For testing inpout32.dll in Visual Basic 6, see my example program Test_inpout32_vb6.zip. For testing inpout32.dll in Visual Basic .NET, see my example program Test_inpout32_vbdotnet.zip.
IO ActiveX Communications module. Shareware. Line-printer-type access to LPT ports.. From JSPayne.
Parallel Port Direct I/O Access package. Shareware. Supports: port I/O. Supports access under NT by changing the I/O permission map for the process that claims the port. From Peter Shoebridge at Zeecube Software
TVicHW32 & TVicPort. Shareware. Supports: port I/O and hardware interrupts. From EnTech Taiwan
WinIO. Freeware. Supports: port I/O. Includes a DLL, declarations, and C source code. From Internals.com.
For Windows 95/98/Me Only
Inpout32.zip. Freeware. Supports: port I/O. The file contains inpout32.dll, which I wrote in Delphi 2. The zip file includes the DLL, Visual-Basic declarations for inp and out, documentation, a test program, and the Delphi source code, which includes assembly code for port I/O. If you don't see the DLL file after you unzip the files, you probably have system files hidden. To unhide them, go to My Computer > View > Folder Options > View > Hidden Files and select Show All Files. Instructions for using inpout32 with C++ are in Jan's FAQ. To add port access under Windows NT/2000/XP with no changes to application code, see Inpout32.dll above.
Win95io.zip. Freeware. Supports: port I/O. Another inpout DLL. The DLL is just 2048 bytes. From Jonathan Wood at Softcircuits.
For Windows NT/2000/Xp Only
Direct I/O. Shareware. Incluces interrupt emulation. From Ingenieurbuero Paule.
NTPort Library. Shareware. From Zeal SoftStudio.
PortTalk. Freeware. From BeyondLogic.
The SHA toolkit. Freeware. Enables port I/O, hardware interrupts, and DMA from C++ and Delphi applications. From Sybera.
Thesycon has a driver for NT and Windows 2000.
Use these with products such as Visual Basic 3 or 16-bit Visual Basic 4 under Windows 3.x.
inpout16.zip Freeware. Supports: port I/O. Includes an inpout DLL, source code in PowerBasic, and an example VB project. From Lakeview Research.
inpout.zip. Freeware. Supports: port I/O. Another inpout DLL. Includes assembly-language source code. From Jay Munro.
vbasm.zip. Freeware. Supports: port I/O. A DLL that adds Inp, Out, Peek, Poke, Call Interrupt, and more for accessing ports and memory. From Jonathan Wood at Softcircuits.
For 16- and 32-bit Programs (Windows 3.x, Windows 95/98)
PowerBasic is the source for several products that are useful for applications that access ports. PowerBasic's 16-bit and 32-bit DLL compilers enable you to write and compile DLLs in Basic. The Basic syntax is nearly identical to classic QuickBasic. Because the DLLs are compiled, not interpreted like Visual Basic code, they're fast. The 16-bit edition includes inp and out for port access. The 32-bit edition allows port access under Windows 95/98 via inline assembly code. There's also a 32-bit Basic console compiler for text-only Windows applications and even a DOS compiler.
Vbio.dll. Freeware. From Zeal SoftStudio.
Other Driver Information and Sources
Windows 2000 and Windows Me include a USB printer driver, and the driver can be distributed for use with Windows 98.
The Device Driver Resource Page has many links. From Bob Weiman and Oracle Engineering.
Warp Nine Engineering has IEEE-1284 drivers.
The ppdev driver enables accessing port bits, interrupts, negotiating, and setting modes.