Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Parallel Port on a PC C Programming for Engineers Nick Urbanik nicku@nicku.org This document Licensed under GPL—see slide 34 Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document 2005 October slide 1/34 Outline Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document slide 2/34 I/O Ports on a PC Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers There are 216 = 65536 I/O addesses each of these is called an I/O port They are accessed with the in and out Intel assembly language instructions The I/O ports are separate from ordinary memory addresses We say, “I/O ports have a separate address space from memory addresses”. Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document I/O ports usually connect to registers on integrated circuits on the motherboard or on cards plugged into the motherboard slide 3/34 Hardware of I/O ports Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers We cannot connect hardware directly to the data bus on the CPU CPU may not source or sink enough current but the main reason is that the data bus is changing all the time Carries instructions and other data, continuously passing back and forth Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document For output: need a latch (set of flip-flops) to catch the data when the output instruction is executed, and hold the data steady For input: a tristate buffer (e.g., 571) that connects input pin to data bus at the time the input instruction is executed slide 4/34 Hardware of Output Port octal latch data bus Parallel Port on a PC Nick Urbanik I/O Ports on a PC 8 DQ 8 output port pins to the outside world Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector XIOW Permissions Performing I/O in Windows XP, 2000, NT address bus 16 AEN address decoder Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document the latch “catches” the data and holds it when the output instruction is executed to the correct address The XIOW control line from the CPU’s control bus is activated by the output instruction This keeps the I/O addresses separate from memory addresses even when they have the same address number slide 5/34 Hardware of Input Port data bus Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC 8 8 input port pins from the outside world The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions XIOR Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll address bus AEN 16 address decoder References License of this Document The tristate buffer connects the input pin to the data bus only when the input instruction is executed with the appropriate address The XIOR control line from the CPU’s control bus is activated by the input instruction slide 6/34 Outline Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 7/34 Five modes of Operation Newer parallel ports are standardised under IEEE standard 1284 released in 1994 Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document The standard defines five modes of operation: Compatibility mode — sometimes called “Centronics Mode” can send data out only upper limit: 50 kBps to 150 kBps, depending on hardware nibble mode Can input 4 bits at a time byte mode can input a byte at a time using parallel port’s bi-directional feature EPP mode (Enhanced Parallel Port) — Uses additional hardware to perform handshaking ECP Mode (Extended Capabilities Port) Uses DMA and FIFO buffers to move data without using I/O instructions slide 8/34 Handshaking with a printer in Compatibility Mode Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers To output a byte from the parallel port to the printer in compatibity mode: 1. Write the byte to the Data Port 2. Check if the BUSY line is active If the printer is busy, the port will not accept any data, so any data sent to the data port will be lost Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document 3. Take the STROBE line low Tells printer that valid data is waiting on the data pins 2–9 4. Put STROBE high again after about 5 microseconds. slide 9/34 Outline Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 10/34 The Three Printer Port Base Addresses Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers Address 0x3bc – 0x3bf Notes Used for parallel ports that were incorporated into video cards, and now an option for an additional port. Does not support ECP Usual address for LPT1 (first parallel port) Usual address for LPT2 (second parallel port) Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document 0x378 – 0x37f 0x278 – 0x27f slide 11/34 There are three I/O Ports Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers The Data Port Data port At printer port base address all eight bits normally output Can input data if port has bi-directional hardware The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document Status port at base address + 1 read only Control Port at base address + 2 read and write, though was originally intented as a write only port. slide 12/34 Outline Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers The Data Port The Status Port I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 13/34 The Data Port At: base address of printer port Write only, unless the port hardware is bi-directional pin number 2 3 4 5 6 7 8 9 Bit number bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 signal name D0 D1 D2 D3 D4 D5 D6 D7 Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 14/34 Outline Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers The Data Port The Status Port I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 15/34 The Status Port At: Base address + 1 Read only pin number Bit number bit 0 bit 1 bit 2 15 13 12 10 11 bit 3 bit 4 bit 5 bit 6 bit 7 signal name reserved reserved IRQ ERROR SLCT PE (Paper End) ACK BUSY Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 16/34 Outline Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers The Data Port The Status Port I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 17/34 The Control Port At: base address + 2 Read and Write pin number 1 14 16 17 Bit number bit 0 bit 1 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 signal name STROBE AUTOFEED (Auto Linefeed) INIT PRN SELECT Enable IRQ via Ack Enable Bi-Directional Port Unused Unused Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 18/34 Using the Printer Port for I/O Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Here, we use the printer port in compatibility mode In this mode, the three ports are not available as general purpose 8-bit input/output ports They are set up to talk to a printer But you can still use these ports for many purposes Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 19/34 Signals and pin numbers for general purpose I/O Port Data base Signal Name D0 D1 D2 D3 D4 D5 D6 D7 ERROR SLCT PE ACK BUSY STROBE AUTOFEED INIT PRN SELECT GND slide 20/34 Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll DB25 pin number 2 3 4 5 6 7 8 9 15 13 12 10 11 1 14 16 17 18–25 Comments All outputs latched Status bit 3 base + 1 bit 4 bit 5 bit 6 bit 7 Control bit 0 base + 2 bit 1 bit 2 bit 3 input input input input inverted input inverted output inverted output output inverted output References License of this Document Pin numbers on DB25 Connector Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O This views the female connector i.e., on the back of the computer 13 25 12 24 11 23 10 22 9 21 8 20 7 19 6 18 5 17 4 16 3 15 2 14 1 The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document View of female DB25 connector slide 21/34 Pin Numbers on Parallel Port DB25 Pin No (D-Type 25) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 – 25 slide 22/34 Parallel Port on a PC Nick Urbanik Pin No (Centronics) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 32 31 36 19 – 30 SPP Signal Direction (In or Out) Register Inv? I/O Ports on a PC Parallel Port in a PC STROBE In/Out D0 Out D1 Out D2 Out D3 Out D4 Out D5 Out D6 Out D7 Out ACK In BUSY In PE In (PaperEnd) SELECT In AUTOFEED In/Out (Auto-Linefeed) ERROR / In Fault INIT PRN In/Out SELECT In/Out Select-In Ground GND Control Data Data Data Data Data Data Data Data Status Status Status Status Control Status Control Control Yes The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Yes References License of this Document Yes Yes Do not run your programs as root/Administrator Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O Normally, to access I/O ports requires administrator priveleges . . . but it is a bad idea to do everything as the root or administrative user A small mistake can stop the system from functioning correctly In Windows XP/2000/NT, additionally, special unsupported software is required. Linux provides a system call ioperm() that allows the root user to grant normal user access to particular ports The ports must be at port address 0x3ff or below The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 23/34 Performing I/O in Windows XP, 2000, NT Port I/O on Windows XP, Windows 2000, Windows NT is a complex, barely supported mess. Use Linux if you want something simple, standardised and supported: http://linuxgazette.net/112/radcliffe.html Several people have built device drivers to work around the limitations of Windows: inpout32.dll: http://www.logix4u.net/inpout32.htm PortTalk: http: //www.beyondlogic.org/porttalk/porttalk.htm io.dll: http://www.geekhideout.com/iodll.shtml giveio.sys: http://www.physik.rwth-aachen.de/group/ IIIphys/CMS/tracker/en/silicon/arcs_nt.html directio: http://www.direct-io.com/ Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 24/34 None of these are Open Source, but inpout32.dll seems to be best supported and have the most open license, so we will use that. Outline Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document References License of this Document slide 25/34 Installing Andy Eager’s wrapper for logix4u inpout32.dll Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Note: this is for use with Microsoft Windows. The procedure with Linux is different, simpler and faster: see the references. Download Andy’s handy package from http://www.linuxivr.com/c/week1/ioports.zip Unzip this into a temporary directory execute install.bat from a command prompt in that directory as the Administrator Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document slide 26/34 Outline Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document References License of this Document slide 27/34 Using Andy Eager’s wrapper Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector See the program ledscan.c in http://www.linuxivr.com/c/week1/ioports.zip — use this as a model to see how to perform I/O Compile your program with the command: g++ -Wall -lioports -o program program .cpp Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document slide 28/34 Outline Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper I/O Ports on a PC Parallel Port in a PC Introduction The Three Printer Port Base Addresses The Three Registers The Data Port The Status Port The Control Port Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper References License of this Document References License of this Document slide 29/34 Using inpout32.dll without Andy’s wrapper Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers This could (potentially) give better performance if you initialise the library once at the beginning and free the library once after all I/O is finished However, Andy says the difference in speed is not detectable Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll Installing Andy Eager’s wrapper Using Andy Eager’s wrapper Using inpout32.dll without Andy’s wrapper See the test program http://www.hytherion.com/beattidp/comput/ pport/test2.c, and also the source to Andy’s wrapper at http: //www.linuxivr.com/c/week1/install-io.html, and use them as a model for your program. References License of this Document slide 30/34 References — Web I logix4u.net. Inpout32.dll for WIN NT/2000/XP — logix4u. http://www.logix4u.net/inpout32.htm Andrew Eager. Installing the logix4u IO interface. http://linuxivr.com/c/week1/install-io.html logix4u. Parallel port Interfacing Tutorial. http://www.logix4u.net/parallelport1.htm Joe D. Reeder. Controlling The Real World With Computers http://learn-c.com/ Riku Saikkonen. Linux I/O port programming mini-HOWTO http://www.tldp.org/HOWTO/ IO-Port-Programming.html slide 31/34 Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document References — Web II P. J. Radcliffe. Linux: A Clear Winner for Hardware I/O. Linux Gazette, Issue 112, March 2005. http://linuxgazette.net/112/radcliffe.html David Chong and Philip Chong Linux Analog to Digital Converter. Linux Gazette, Issue 118, September 2005. http://linuxgazette.net/118/chong.html Craig Peacock Interfacing the Standard Parallel Port. http://www.beyondlogic.org/spp/parallel.htm Jan Axelson. The PC’s Parallel Port. http://www.lvr.com/parport.htm Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 32/34 References — Books Steve Oualline. Practical C Programming. O’Reilly, 1993. Paul Davies. The Indispensable Guide to C with Engineering Applications Addison-Wesley, 1995. Tom Adamson and James L. Antonakos and Kenneth C. Mansfield Jr. Structured C for Engineering and Technology, Third Edition. Prentice Hall, 1998. Brian W. Kernighan and Dennis M. Ritchie. The C Programming Language. Prentice Hall, 1988. Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document slide 33/34 License covering this document Parallel Port on a PC Nick Urbanik I/O Ports on a PC Parallel Port in a PC The Three Registers Using the Printer Port for General I/O The pins on the 25-pin connector Permissions Performing I/O in Windows XP, 2000, NT Using Andy Eager’s wrapper for logix4u inpout32.dll References License of this Document Copyright c 2005, 2006 Nick Urbanik You can redistribute modified or unmodified copies of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation — either version 2 of the License or (at your option) any later version. slide 34/34