tag:blogger.com,1999:blog-7777687488268904012024-02-08T07:40:41.132-08:00PROJECTS THROUGH PARALLEL PORT INTERFACINGBinod Shahhttp://www.blogger.com/profile/00818302147132032753noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-777768748826890401.post-28849819453961140652007-03-31T05:16:00.000-07:002007-03-31T06:00:17.535-07:00PROJECTS THROUGH PARALLEL PORT INTERFACING<div align="justify"><br /><a href="http://www.lvr.com/"><span style="color:#ff0000;">Lakeview Research home</span></a><br /><a href="http://www.lvr.com/search.htm"><span style="color:#ff0000;">SEARCH</span></a><span style="color:#ff0000;"> </span><br /><a href="http://www.lvr.com/quicklinks.htm"><span style="color:#ff0000;">Quick Links</span></a><span style="color:#ff0000;"><br />Resource Pages<br /></span><a href="http://www.lvr.com/usb.htm"><span style="color:#ff0000;">USB</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/usbcode.htm"><span style="color:#ff0000;">USB Code</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/usbchips.htm"><span style="color:#ff0000;">USB Chips</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/hidpage.htm"><span style="color:#ff0000;">HID Page</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/mass_storage.htm"><span style="color:#ff0000;">Mass Storage</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/ethernet.htm"><span style="color:#ff0000;">Embedded Ethernet and Internet</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/serport.htm"><span style="color:#ff0000;">Serial Ports</span></a><a href="http://www.lvr.com/serport.htm"></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/parport.htm"><span style="color:#ff0000;">Parallel Port</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/microc.htm"><span style="color:#ff0000;">8052-Basic</span></a><span style="color:#ff0000;"> </span><a href="http://www.lvr.com/microc.htm"><span style="color:#ff0000;">Microcontrollers</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/pcbs.htm"><span style="color:#ff0000;">PC Boards</span></a><span style="color:#ff0000;"><br />Books<br /></span><a href="http://www.lvr.com/usbms.htm"><span style="color:#ff0000;">USB Mass Storage</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/usbc.htm"><span style="color:#ff0000;">USB Complete</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/eec.htm"><span style="color:#ff0000;">Embedded Ethernet and Internet Complete</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/spc.htm"><span style="color:#ff0000;">Serial Port Complete</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/parprtib.htm"><span style="color:#ff0000;">Parallel Port Complete</span></a><span style="font-size:0;"></span><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/microcib.htm"><span style="color:#ff0000;">The Microcontroller Idea Book</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/makpcbds.htm"><span style="color:#ff0000;">Making Printed Circuit Boards</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/ordering.htm"><span style="color:#ff0000;">Where to Buy the Books</span></a><span style="color:#ff0000;"><br />Lakeview Research Info<br /></span><a href="http://www.lvr.com/index.html#Contact%20Information"><span style="color:#ff0000;">Contact Lakeview</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/press.htm"><span style="color:#ff0000;">News for the Media</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/articles.htm"><span style="color:#ff0000;">Magazine Articles</span></a><span style="color:#ff0000;"><br />Sponsored Links<br /></span><a href="http://driveragent.com/?ref=124"><span style="color:#ff0000;">USB Drivers</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.absolute-software.co.uk/"><span style="color:#ff0000;">Embedded Programming Services</span></a><span style="color:#ff0000;"><br /></span><a href="http://www.lvr.com/"><span style="color:#ff0000;">Lakeview Research home</span></a><span style="color:#333333;"><span style="color:#ff0000;"> > Parallel Port Central<br />Parallel Port Central</span><br /></span><span style="color:#33ffff;">A collection of files and links to material about the PC's parallel port, including ECP, EPP, bidirectional, and IEEE-1284 modes (and other I/O ports as well).<br />brought to you by Jan Axelson<br /></span><a href="http://www.lvr.com/parport.htm#Basics"><span style="color:#33ffff;">Basics</span></a><span style="color:#33ffff;"> </span><a href="http://www.lvr.com/parport.htm#Enhanced"><span style="color:#33ffff;">ECP & EPP</span></a><span style="color:#33ffff;"> </span><a href="http://www.lvr.com/parport.htm#Hardware"><span style="color:#33ffff;">Hardware</span></a><span style="color:#33ffff;"> </span><a href="http://www.lvr.com/parport.htm#Troubleshooting"><span style="color:#33ffff;">Troubleshooting</span></a><span style="color:#33ffff;"> </span><a href="http://www.lvr.com/parport.htm#ConnectingTwoPCs"><span style="color:#33ffff;">Connecting 2 PCs</span></a><span style="color:#33ffff;"><br /></span><a href="http://www.lvr.com/parport.htm#Enhanced"></a><a href="http://www.lvr.com/parport.htm#UsingPrinters"><span style="color:#33ffff;">Using Printers</span></a><span style="color:#33ffff;"> </span><a href="http://www.lvr.com/parport.htm#Enhanced"></a><a href="http://www.lvr.com/parport.htm#Programming"><span style="color:#33ffff;">Programming</span></a><a href="http://www.lvr.com/parport.htm#Cables"></a><span style="color:#33ffff;"> </span><a href="http://www.lvr.com/parport.htm#Books"><span style="color:#33ffff;">Books</span></a><span style="color:#33ffff;"><br />Parallel Port Complete<br />For all you ever wanted to know about the parallel port, order a copy of </span><a href="http://www.lvr.com/parprtib.htm"><span style="color:#33ffff;">Parallel Port Complete</span></a><span style="color:#33ffff;">. Read </span><a href="http://www.lvr.com/parprtib.htm#Chapter1"><span style="color:#33ffff;">Chapter 1</span></a><span style="color:#33ffff;"> on-line.<br /></span><a name="Basics"></a><span style="color:#33ffff;">The Basics<br /></span><a href="http://www.lvr.com/jansfaq.htm"><span style="color:#33ffff;">Jan's Parallel Port FAQ</span></a><span style="color:#33ffff;"> has answers to frequently asked questions about using, interfacing, and programming the parallel port in all of its modes.<br /></span><a href="http://www.lvr.com/files/ibmlpt.txt"><span style="color:#33ffff;">The parallel port FAQ </span></a><span style="color:#33ffff;">. Basics about the parallel port and how to use it, by Zhahai Stewart. (50K)<br /></span><a href="http://www.phanderson.com/"><span style="color:#33ffff;">Control and data acquisition</span></a><span style="color:#33ffff;"> information and projects, from Peter H. Anderson and his students. Code examples in C.<br /></span><a href="ftp://ftp.armory.com/pub/user/rstevew/LPT/"><span style="color:#33ffff;">Various LPT documents.</span></a><span style="color:#33ffff;"> Steve Walz has collected a useful set of parallel-port-related FAQs and information.<br /></span><a href="http://www.beyondlogic.org/index.html#PARALLEL"><span style="color:#33ffff;">Beyond Logic</span></a><span style="color:#33ffff;"> has tutorials (including EPP and ECP), projects, and a debug tool with source code. From Craig Peacock.<br /></span><a href="http://www.doc.ic.ac.uk/~ih/doc/par/"><span style="color:#33ffff;">Interfacing to the IBM-PC Parallel Printer Port</span></a><span style="color:#33ffff;">. General information, plus several projects.<br /></span><a href="http://www.epanorama.net/links/pc/index.html"><span style="color:#33ffff;">Tomi Engdahl's PC Hardware pages</span></a><span style="color:#33ffff;">. Many links.<br /></span><a href="http://www.pcwebopedia.com/Hardware/Ports_and_Interfaces/"><span style="color:#33ffff;">PC Webopedia</span></a><span style="color:#33ffff;">. Definitions and many links.<br /></span><a href="http://electrosofts.com/parallel/index.html"><span style="color:#33ffff;">Parallel Port Programming</span></a><span style="color:#33ffff;">. An article from Hasha Perla.<br /></span><a href="http://www.torque.net/linux-pp.html"><span style="color:#33ffff;">External Parallel Port devices and Linux</span></a><span style="color:#33ffff;">. Many links and info about the Linux-parport mailing list. From Grant Guenther.<br />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. </span><a href="http://www.qi.fcen.uba.ar/materias/iqi/paralel1/home.clear.net.nz/pages/kheidens/lptcap/lptcap.htm"><span style="color:#33ffff;">LPTCAP</span></a><span style="color:#33ffff;"> is another approach, consisting of circuits and software for reading the data into a PC's parallel port. From Kris Heidenstrom. Also see </span><a href="http://www.jadtechcorp.com/hawk.htm"><span style="color:#33ffff;">JADTech's Silent Hawk</span></a><span style="color:#33ffff;">.<br />A tutorial on </span><a href="http://www.cnckits.com/"><span style="color:#33ffff;">motion control from the parallel port</span></a><span style="color:#33ffff;">. From cncKITS.<br />Some web pages in Spanish: </span><a href="http://www.angelfire.com/pa2/jcgr/tecnica/PP/pp.htm"><span style="color:#33ffff;">El Puerto Paralelo</span></a><span style="color:#33ffff;"> from Juan Carlos Galarza Roca. </span><a href="http://www.modelo.edu.mx/univ/virtech/circuito/paralelo.htm"><span style="color:#33ffff;">El puerto paralelo de la PC</span></a><span style="color:#33ffff;"> from Virgilio Gómez Negrete. </span><a href="http://www.pchardware.org/puertos/paralelo.php"><span style="color:#33ffff;">El puerto paralelo</span></a><span style="color:#33ffff;"> from Javier Olcina and David Romero.<br /></span><a name="Enhanced and Extended Ports"></a><span style="color:#33ffff;">Enhanced and Extended Ports<br />Including the bidirectional (PS/2) port, extended capabilities port (ECP), and enhanced parallel port (EPP), and the IEEE-1284 standard that descibes them all.<br />General Information<br />A table showing the </span><a href="http://www.lvr.com/files/pppinout.pdf"><span style="color:#33ffff;">pinouts</span></a><span style="color:#33ffff;"> 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)<br /></span><a name="Warp Nine Engineering"></a><a href="http://www.fapo.com/"><span style="color:#33ffff;">Warp Nine Engineering</span></a><span style="color:#33ffff;"> 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 </span><a href="http://www.fapo.com/files/ecp_reg.pdf"><span style="color:#33ffff;">Microsoft's document describing ECP mode</span></a><span style="color:#33ffff;">. (325k, PDF file).<br />Various files relating to the IEEE-1284 standard, from </span><a href="ftp://ftp.lexmark.com/ieee/"><span style="color:#33ffff;">Lexmark's FTP site</span></a><span style="color:#33ffff;"><br />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 </span><a href="http://shop.ieee.org/ieeestore/Product.aspx?product_no=SS94880"><span style="color:#33ffff;">IEEE</span></a><span style="color:#33ffff;">.<br /></span><a href="http://www.smsc.com/ftpdocs/chips.html"><span style="color:#33ffff;">Standard Microsystems Corp.</span></a><span style="color:#33ffff;"> has preliminary versions of the daisy-chain specification and EPP BIOS, plus drivers and source code for SMC chips.<br /></span><a href="http://www.transdigital.net/"><span style="color:#33ffff;">Trans Digital</span></a><span style="color:#33ffff;"> has a high-speed universal parallel-port product.<br /></span><a name="Hardware"></a><span style="color:#33ffff;">Hardware<br />Boards<br /></span><a href="http://www.winfordeng.com/products/"><span style="color:#33ffff;">Winford Engineering</span></a><span style="color:#33ffff;"> has very handy breadboard adapters and breakout boards with DB-25 connectors.<br /></span><a href="http://www.zanthic.com/"><span style="color:#33ffff;">Zanthic</span></a><span style="color:#33ffff;"> has inexpensive proto boards for parallel-port interfacing with EPP handshaking. Some also have a CAN interface.<br /></span><a href="http://www.byterunner.com/"><span style="color:#33ffff;">Byte Runner Technologies</span></a><span style="color:#33ffff;"> has parallel-port expansion cards, both ISA and PCI-based.<br />Chips<br />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.<br /></span><a href="http://www.amd.com/epd/29k/202_ds/202_ds.pdf"><span style="color:#33ffff;">AMD's Am29202 processor</span></a><span style="color:#33ffff;"> (PDF), for use in EPP/ECP (peripheral-side).<br />National Semiconductor has a variety of </span><a href="http://www.national.com/appinfo/advancedio/"><span style="color:#33ffff;">Super I/O</span></a><span style="color:#33ffff;"> chips that include an IEEE 1284-compatible parallel port with EPP and ECP modes. (PC-side)<br /></span><a href="http://www.fairchildsemi.com/pf/74/74VHC161284.html"><span style="color:#33ffff;">Fairchild's 74VHC161284 Transceiver</span></a><span style="color:#33ffff;"> 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.<br /></span><a href="http://www.smsc.com/"><span style="color:#33ffff;">Standard Microsystems Corp.,</span></a><span style="color:#33ffff;"> (SMSC), another manufacturer of EPP/ECP parallel-port chips. (PC- and peripheral-side).<br /></span><a href="http://www.exar.com/products.php?areaID=3"><span style="color:#33ffff;">Exar/Startech</span></a><span style="color:#33ffff;">'s ST78C34 and ST78C36 are EPP/ECP chips. Look under Products/Communications/General Purpose. (PC-side).<br /></span><a href="http://www.ti.com/sc/docs/msp/irda/selguide.htm#pir552"><span style="color:#33ffff;">Texas Instruments' TL16PIR552</span></a><span style="color:#33ffff;"> includes a PC-side ECP+EPP, plus a dual UART and IrDa interface.<br /></span><a href="http://www.fapo.com/1284pic.htm"><span style="color:#33ffff;">Warp Nine's W91284PIC</span></a><span style="color:#33ffff;"> supports all modes, plus daisy-chaining and negotiating. (peripheral-side)<br /></span><a href="http://www.winbond.com.tw/E-WINBONDHTM/partner/_Computer_SIO_ISASIO.htm"><span style="color:#33ffff;">Winbond</span></a><span style="color:#33ffff;"> has PC-side chips.<br /></span><a name="Cables"></a><span style="color:#33ffff;">Cables<br /></span><a href="http://www.geocities.com/keinhong/nfpt/"><span style="color:#33ffff;">NFPT (No-Frills Parallel Transfer)</span></a><span style="color:#33ffff;"> 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.<br />Denis Kondakov has figured out </span><a href="http://www.lvr.com/files/ecp-dcc.zip"><span style="color:#33ffff;">how to do Direct Cable Connection ECP transfers between PCs</span></a><span style="color:#33ffff;"> using a simple, home-brewed cable configuration. It requires a patch to paralink.vxd (zip file, 36k).<br /></span><a href="http://www.lpt.com/lpt/"><span style="color:#33ffff;">Parallel Technologies'</span></a><span style="color:#33ffff;"> 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.<br />Trans Digital's </span><a href="http://www.transdigital.net/"><span style="color:#33ffff;">Universal Parallel Port</span></a><span style="color:#33ffff;"> is a high-speed, long-distance link between parallel-port peripherals and a PC-ard (PCMCIA) slot.<br />If you want to connect your parallel printer to a USB port, USBGear has a </span><a href="http://www.usbgear.net/item_157.html"><span style="color:#33ffff;">True-Bi Directional USB Printer Cable adapter</span></a><span style="color:#33ffff;"> (USBG-1284Bi) that claims to support bidirectional printer communications. (Most other adapters don't.)<br /></span><a name="Troubleshooting"></a><span style="color:#33ffff;">Troubleshooting<br /></span><a href="http://www.lvr.com/files/para14.zip"><span style="color:#33ffff;">Para14.zip</span></a><span style="color:#33ffff;">. Parallel-port diagnostic and information utility from Parallel Technologies. (88K)<br /></span><a href="http://www.sysinternals.com/ntw2k/freeware/portmon.shtml"><span style="color:#33ffff;">PortMon</span></a><span style="color:#33ffff;"> monitors and displays all serial and parallel port activity on a system. From Mark Russinovich.<br /></span><a href="http://www.jadtechcorp.com/hawk.htm"><span style="color:#33ffff;">JadTech's Silent Hawk</span></a><span style="color:#33ffff;"> products non-obtrusively capture parallel-port data. The Silent Hawk III Model 1284 functions as a protocol analzyer.<br /></span><a href="http://www.qualitylogic.com/printer_test.html"><span style="color:#33ffff;">QualityLogic</span></a><span style="color:#33ffff;"> has a protocol analyzer and test suite for IEEE-1284 links as well as a variety of products for printer testing.<br /></span><a name="ConnectingTwoPCs"></a><span style="color:#33ffff;">Connecting Two PCs<br />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.<br /></span><a href="http://www.kime.net/directcc/index.html"><span style="color:#33ffff;">The Connect Pages</span></a><span style="color:#33ffff;"> have information on how to connect two PCs running various combinations of operating systems, using serial and parallel ports. From Kime.Net.<br />Sewell Development's </span><a href="http://www.sewelld.com/"><span style="color:#33ffff;">Fast Lynx</span></a><span style="color:#33ffff;"> works with everything from DOS through Windows XP.<br /></span><a href="http://www.laplink.com/products/llgold/overview.asp"><span style="color:#33ffff;">Laplink</span></a><span style="color:#33ffff;"> and </span><a href="http://enterprisesecurity.symantec.com/products/products.cfm?productID=2"><span style="color:#33ffff;">pcAnywhere</span></a><span style="color:#33ffff;"> support PC-to-PC transfers.<br />Also see the information under </span><a href="http://www.lvr.com/parport.htm#Cables"><span style="color:#33ffff;">Cables</span></a><span style="color:#33ffff;">.<br /></span><a name="UsingPrinters"></a><span style="color:#33ffff;">About Using Printers<br />Most USB/parallel-port converters are for connecting a parallel-port printer to a PC's USB port. The </span><a href="http://www.epapersign.com/parallel2usb/"><span style="color:#33ffff;">LPT2USB</span></a><span style="color:#33ffff;"> enables connecting a USB printer to a PC's parallel port. From ePaperSign.<br /></span><a href="http://search.support.microsoft.com/search/?adv=1"><span style="color:#33ffff;">Microsoft's Knowledge Base</span></a><span style="color:#33ffff;"> has printer-related articles. These are just a few:<br /></span><a href="http://support.microsoft.com/kb/q154078/"><span style="color:#33ffff;">HOWTO: Send Raw Data to a Printer Using the Win32 API from Visual Basic</span></a><span style="color:#33ffff;">. Article ID: 154078. </span><a href="http://support.microsoft.com/support/kb/articles/Q96/7/95.ASP"><span style="color:#33ffff;">HOWTO: Use PASSTHROUGH Escape to Send Data Directly to Printer</span></a><span style="color:#33ffff;">. Article ID: 96795. </span><a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;160129"><span style="color:#33ffff;">HOWTO: Get the Status of a Printer and a Print Job</span></a><span style="color:#33ffff;">. Article ID: 160129.<br /></span><a href="http://www.fixyourownprinter.com/"><span style="color:#33ffff;">Do-it-yourself printer repair</span></a><span style="color:#33ffff;">.<br /></span><a href="http://blog.peter.skarpetis.com/archives/2005/04/07/getting-a-handle-on-usbprintsys/"><span style="color:#33ffff;">How to access USB printers using the API functions CreateFile and WriteFile</span></a><span style="color:#33ffff;">. From Peter Skarpetis.<br />The </span><a href="http://www.elabinc.com/printer.htm"><span style="color:#33ffff;">EDE1400 Serial to Parallel-Printer Converter</span></a><span style="color:#33ffff;"> chip converts serial data to a parallel interface suitable for connecting to parallel printers. The chip generates printer-control signals and monitors printer-status signals. From E-Lab Digital Engineering.<br /></span><a name="Projects"></a><span style="color:#33ffff;">Various Projects<br />Projects that use the parallel port or an I/O chip like the 8255 Parallel Peripheral Interface chip.<br /></span><a href="http://www.boondog.com//tutorials/8255/8255.htm"><span style="color:#33ffff;">Connecting an 8255 Parallel Peripheral Interface to the ISA bus</span></a><span style="color:#33ffff;">. From Boondog Automation.<br /></span><a href="http://www.pjrc.com/tech/8051/ide/wesley.html"><span style="color:#33ffff;">How to connect an IDE disk to a microcontroller using an 8255</span></a><span style="color:#33ffff;">. by Peter Faasse. I've included this one because of many requests for info about IDE interfacing.<br />GKDesign's </span><a href="http://www.geocities.com/SiliconValley/Lakes/7156/"><span style="color:#33ffff;">Universal IR Controller for a PC</span></a><span style="color:#33ffff;"> includes source code and a circuit for reading and sending infrared remote-control signals via the parallel port.<br /></span><a href="http://pinewood.hmpg.net/"><span style="color:#33ffff;">World's Least Expensive Pinewood Derby Timer</span></a><span style="color:#33ffff;">. From James H. Brown.<br /></span><a name="Programming"></a><span style="color:#33ffff;">Programming<br />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.<br />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.<br />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.<br />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.<br />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 </span><a href="http://www.microsoft.com/whdc/devtools/ddk/default.mspx"><span style="color:#33ffff;">Windows DDK</span></a><span style="color:#33ffff;"> has details. Search for Parallel Devices and Drivers in the documentation index.<br />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.<br />Programming Tools for Port I/O and Interrupts<br />For Windows 95/98/NT/2000/Me/Xp<br /></span><a href="http://www.logix4u.net/"><span style="color:#33ffff;">Inpout32.dll</span></a><span style="color:#33ffff;"> is compatible with my Win9x inpout32.dll (below) but works under all Windows editions from Win95/98/Me to WinNT/2000/XP. For Windows NT etc., a kernel mode device driver is embedded in the DLL in binary form. 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 </span><a href="http://www.lvr.com/files/test_inpout32_vb6.zip"><span style="color:#33ffff;">Test_inpout32_vb6.zip</span></a><span style="color:#33ffff;">. For testing inpout32.dll in Visual Basic .NET, see my example program </span><a href="http://www.lvr.com/files/test_inpout32_vbdotnet.zip"><span style="color:#33ffff;">Test_inpout32_vbdotnet.zip</span></a><span style="color:#33ffff;">.<br /></span><a href="http://www.codeproject.com/csharp/csppleds.asp"><span style="color:#33ffff;">I/O Ports Uncensored</span></a><span style="color:#33ffff;">. How to access ports in C# (CSharp) using inpout32. By Levent S. and the Code Project.<br />Before you can access an I/O port, you need to know its address. The </span><a href="http://sourceforge.net/project/showfiles.php?group_id=107163&package_id=117766"><span style="color:#33ffff;">get_io</span></a><span style="color:#33ffff;"> DLL finds port addresses and has been tested in Windows 98/2000/XP. It does not work under Windows NT. (See </span><a href="http://www.lvr.com/jansfaq.htm"><span style="color:#33ffff;">Jan's FAQ</span></a><span style="color:#33ffff;"> for NT info.) Free. From Graham Bartlett.<br /></span><a href="http://www.lvr.com/files/GetPortAddress.zip"><span style="color:#33ffff;">GetPortAddress</span></a><span style="color:#33ffff;"> is a Visual Basic 6 application that retrieves parallel-port addresses. Free. From Servo Wizard.<br /></span><a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;823179&Product=vb6"><span style="color:#33ffff;">HOW TO: Access Serial Ports and Parallel Ports by Using Microsoft Visual Basic .NET</span></a><span style="color:#33ffff;">. How to use WriteFile to access the data port. Knowledge Base article #823179 from Microsoft.<br /></span><a href="http://sheepdogguides.com/dt4j.htm"><span style="color:#33ffff;">Delphi: Accessing Port Hardware and how to use InpOut32.dll</span></a><span style="color:#33ffff;">. From TK Boyd.<br /></span><a href="http://www.driverlinx.com/"><span style="color:#33ffff;">DriverLinx Port I/O</span></a><span style="color:#33ffff;">. Freeware. Supports: port I/O. From Scientific Software Tools. John Pappas has written </span><a href="http://diskdude.cjb.net/software/cbuilder/index.html"><span style="color:#33ffff;">TDLPortIO</span></a><span style="color:#33ffff;">, a freeware interface for DriverLinx for use with C++ Builder, Delphi, and other languages.<br /></span><a href="http://www.tetradyne.com/"><span style="color:#33ffff;">DriverX</span></a><span style="color:#33ffff;">. Supports: port I/O and interrupts. From Tetradyne Software.<br /></span><a href="http://www.jspayne.com/io/home.html"><span style="color:#33ffff;">IO ActiveX Communications module</span></a><span style="color:#33ffff;">. Shareware. Line-printer-type access to LPT ports.. From JSPayne.<br /></span><a href="http://www.zeecube.com/driver.htm"><span style="color:#33ffff;">Parallel Port Direct I/O Access package</span></a><span style="color:#33ffff;">. 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<br /></span><a href="http://www.paraport.net/"><span style="color:#33ffff;">ParPort</span></a><span style="color:#33ffff;"> provides a DLL with functions that enable applications to read and write to a parallel port using the enhanced drivers provided with Windows 2000 and Windows Xp. Free for non-commercial use. From ParaPort.net.<br /></span><a href="http://www.entechtaiwan.net/dev/rapid/index.shtm"><span style="color:#33ffff;">RapidDriver</span></a><span style="color:#33ffff;"> generic driver for parallel-port, USB, and other devices. From EnTech Taiwan.<br /></span><a href="http://www.entechtaiwan.com/tools.htm"><span style="color:#33ffff;">TVicHW32 & TVicPort</span></a><span style="color:#33ffff;">. Shareware. Supports: port I/O and hardware interrupts. From EnTech Taiwan<br /></span><a href="http://www.gizmos-n-gadjets.com/ASP/Software.asp"><span style="color:#33ffff;">W95pio and Ntpio</span></a><span style="color:#33ffff;">. Freeware. Supports: port I/O. Intended for use with HP's VEE visual programming language, but adaptable to other uses. Hosted by Gizmos-N-Gadjets. Ntpio is also available from </span><a href="http://we.home.agilent.com/cgi-bin/bvpub/agilent/editorial/cp_MiscEditorial.jsp?ID=1000000407:epsg:sud&LANGUAGE_CODE=eng&CT=AGILENT_EDITORIAL&COUNTRY_CODE=ZZ"><span style="color:#33ffff;">Agilent</span></a><span style="color:#33ffff;">'s website.<br /></span><a href="http://www.internals.com/"><span style="color:#33ffff;">WinIO</span></a><span style="color:#33ffff;">. Freeware. Supports: port I/O. Includes a DLL, declarations, and C source code. From Internals.com.<br />WinRT, WinRT-VB, WinDK. These products are no longer available from BSQUARE.<br />For Windows 95/98/Me Only<br /></span><a name="inpout32"></a><a href="http://www.lvr.com/files/inpout32.zip"><span style="color:#33ffff;">Inpout32.zip</span></a><span style="color:#33ffff;">. 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 </span><a href="http://www.lvr.com/jansfaq.htm"><span style="color:#33ffff;">Jan's FAQ</span></a><span style="color:#33ffff;">. To add port access under Windows NT/2000/XP with no changes to application code, see Inpout32.dll above.<br />The tutorial </span><a href="http://www.boondog.com/"><span style="color:#33ffff;">Visual Basic DLLs and PC Interfacing</span></a><span style="color:#33ffff;"> is an excellent explanation of how to write your own inpout DLL in Visual C++. From Paul Oh.<br /></span><a href="http://www.softcircuits.com/sw_tools.htm"><span style="color:#33ffff;">Win95io.zip</span></a><span style="color:#33ffff;">. Freeware. Supports: port I/O. Another inpout DLL. The DLL is just 2048 bytes. From Jonathan Wood at Softcircuits.<br />For Windows NT/2000/Xp Only<br /></span><a href="http://www.direct-io.com/"><span style="color:#33ffff;">Direct I/O</span></a><span style="color:#33ffff;">. Shareware. Incluces interrupt emulation. From Ingenieurbuero Paule.<br /></span><a href="http://www.zealsoftstudio.com/ntport/"><span style="color:#33ffff;">NTPort Library</span></a><span style="color:#33ffff;">. Shareware. From Zeal SoftStudio.<br /></span><a href="http://www.beyondlogic.org/porttalk/porttalk.htm"><span style="color:#33ffff;">PortTalk</span></a><span style="color:#33ffff;">. Freeware. From BeyondLogic.<br />The </span><a href="http://www.sybera.de/english/e_sha.htm"><span style="color:#33ffff;">SHA toolkit</span></a><span style="color:#33ffff;">. Freeware. Enables port I/O, hardware interrupts, and DMA from C++ and Delphi applications. From Sybera.<br /></span><a href="http://www.thesycon.de/"><span style="color:#33ffff;">Thesycon</span></a><span style="color:#33ffff;"> has a driver for NT and Windows 2000.<br /></span><a href="http://www.winsite.com/info/pc/winnt/programr/tinypo20.zip/"><span style="color:#33ffff;">Tinyport</span></a><span style="color:#33ffff;">. Shareware. Supports: port I/O. A ready-to-run kernel-mode device driver. Tinyport complies with the rules that Microsoft has specified for NT drivers, so it doesn't undermine NT's stability and can be used in critical applications. From Manfred Keul.<br /></span><a href="http://www.embeddedtronics.com/design&ideas.html"><span style="color:#33ffff;">UserPort</span></a><span style="color:#33ffff;"> is a kernel mode driver for Windows NT/2000 that gives usermode programs access to I/O ports. From Tomas Franzon. Updated 5/31/01. Inspired by the article "Direct Port I/O and Windows NT" by Dale Roberts, which describes a way to defeat NT's security for port I/O. </span><a href="http://www.ddj.com/"><span style="color:#33ffff;">Dr. Dobbs' Journal</span></a><span style="color:#33ffff;">, May 1996. The article is available on CD.<br /></span><a href="http://www.pcjunkie.cwc.net/"><span style="color:#33ffff;">ParIO</span></a><span style="color:#33ffff;"> is an NT Parclass driver modified from a Microsoft DDK demo.From Martin Davey<br />16-bit-only Tools<br />Use these with products such as Visual Basic 3 or 16-bit Visual Basic 4 under Windows 3.x.<br /></span><a href="http://www.lvr.com/files/inpout16.zip"><span style="color:#33ffff;">inpout16.zip</span></a><span style="color:#33ffff;"> Freeware. Supports: port I/O. Includes an inpout DLL, source code in PowerBasic, and an example VB project. From Lakeview Research.<br /></span><a href="http://www.lvr.com/files/inpout.zip"><span style="color:#33ffff;">inpout.zip</span></a><span style="color:#33ffff;">. Freeware. Supports: port I/O. Another inpout DLL. Includes assembly-language source code. From Jay Munro.<br /></span><a href="http://www.softcircuits.com/sw_tools.htm"><span style="color:#33ffff;">vbasm.zip</span></a><span style="color:#33ffff;">. 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.<br />For 16- and 32-bit Programs (Windows 3.x, Windows 95/98)<br /></span><a href="http://www.powerbasic.com/"><span style="color:#33ffff;">PowerBasic</span></a><span style="color:#33ffff;"> 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.<br />"</span><a href="http://www.coolstf.com/vb.html"><span style="color:#33ffff;">Using 16-bit DLLs with 32-bit VB</span></a><span style="color:#33ffff;">." This article explains, step-by-step, a method for using 16-bit DLLs in 32-bit VB applications. The example described is port I/O with Vbasm (see above). To use this method, you must have both a 16-bit and a 32-bit edition of Visual Basic. From COOL.STF.<br /></span><a href="http://www.zealsoftstudio.com/vbio/"><span style="color:#33ffff;">Vbio.dll</span></a><span style="color:#33ffff;">. Freeware. From Zeal SoftStudio.<br />Other Driver Information and Sources<br />Windows 2000 and Windows Me include a </span><a href="http://www.lvr.com/usbwin.htm"><span style="color:#33ffff;">USB printer driver</span></a><span style="color:#33ffff;">, and the driver can be distributed for use with Windows 98.<br />Dan Norton has an FAQ and many links relating to </span><a href="http://www.chsw.com/ddk/"><span style="color:#33ffff;">Device Driver Development</span></a><span style="color:#33ffff;"><br />The </span><a href="http://www.asktheoracle.com/driver/"><span style="color:#33ffff;">Device Driver Resource Page</span></a><span style="color:#33ffff;"> has many links. From Bob Weiman and Oracle Engineering.<br /></span><a href="http://www.lvr.com/parport.htm#Warp"><span style="color:#33ffff;">Warp Nine Engineering</span></a><span style="color:#33ffff;"> has IEEE-1284 drivers.</span><a name="Other Links"></a><span style="color:#33ffff;"><br /></span><a href="http://www.geocities.com/Juanga69/parport/"><span style="color:#33ffff;">Parallel Printer Port Access through Java</span></a><span style="color:#33ffff;">. From Juan Gabriel Del Cid Portillo.<br />Linux<br />The </span><a href="http://people.redhat.com/twaugh/parport/html/ppdev.html"><span style="color:#33ffff;">ppdev</span></a><span style="color:#33ffff;"> driver enables accessing port bits, interrupts, negotiating, and setting modes.<br /></span><a name="Books"></a><span style="color:#33ffff;">Books about Parallel Port Hardware and Programming<br />Here are links to a variety of books about parallel port hardware and programming. The titles are listed alphabetically, except for my book, which is first. :)<br /></span><a href="http://www.lvr.com/parport.htm"><span style="color:#33ffff;">Parallel Port Complete: Programming, Interfacing, and Using the PC's Parallel Printer Port</span></a><a href="http://www.amazon.com/exec/obidos/ASIN/0965081915/janaxelsonslakev"></a><span style="color:#33ffff;">Jan Axelson1996, Lakeview Research343 pages, $39.95 Covers all of the port's modes and how to use them in custom applications.<br />Build Your Own Low-Cost Data Acquisition and Display Devices</span><a href="http://www.amazon.com/exec/obidos/ASIN/0830643486/janaxelsonslakev"></a><span style="color:#33ffff;">by Jeffrey Hirst Johnson1993, McGraw Hill/TAB Electronics305 pages, $24.95Lots of detail about the port hardware (serial ports too) and ISA interfacing, with DOS Pascal program code.<br />Controlling the World With Your PC</span><a href="http://www.amazon.com/exec/obidos/ASIN/1878707159/janaxelsonslakev"></a><span style="color:#33ffff;">by Paul Bergsman1994, LLH Technology Pub257 pages, $35Many projects with DOS code in BASIC, C and Pascal<br />Programming the Parallel Port: Interfacing the PC for Data Acquisition & Process Control</span><a href="http://www.amazon.com/exec/obidos/ASIN/0879305134/janaxelsonslakev"></a><a href="http://www.amazon.com/exec/obidos/ASIN/0879305134/janaxelsonslakev"></a><span style="color:#000099;"><span style="color:#33ffff;">by Dhananjay V. Gadre1998, CMP Books308 pages, $44.95Includes source code in C for DOS and Linux. </span><br /><br /><br /><br /></span></div>Binod Shahhttp://www.blogger.com/profile/00818302147132032753noreply@blogger.com0