Parallel Port Tester

After playing around with a ton of parallel port cards in an attempt to figure out Willem programmer compatibility, I decided it would be useful to write a parallel port tester program. Just a simple utility where you can set the output value of each output pin and read the value of each input pin. Several other test programs exist, but I wasn’t happy with their interfaces, and a lot of them weren’t prepared to easily handle PCI/PCI Express/ExpressCard parallel ports. At worst, they only supported the standard parallel port I/O addresses that new motherboards don’t have anymore. At best, they supported custom parallel ports but required you to manually look up the I/O address range of the card.

Oh, and a lot of the existing tools don’t work with newer versions of Windows. I wanted a tool compatible with newer versions of Windows, both 32-bit and 64-bit.

Introducing Parallel Port Tester:

ParallelPortTester

Simply locate your parallel port in the list that appears in the bottom right. I use several methods to discover parallel ports and their I/O ranges, so you shouldn’t need to enter them manually. If for some reason your port doesn’t show up in the list, you can manually enter the base address of your parallel port (e.g. 0x3000) and hit Enter.

You can toggle parallel port outputs on or off by clicking on the circle representing the pin you want to change. Green represents on (high), black represents off (low). The circles representing input pins are automatically updated while you have the port selected, so you can easily test your inputs. You can also choose whether to use the four control pins as inputs or outputs.

For people who are really interested, I also display the raw register values of the three standard parallel port registers. I show separate values for the control register because what you write to the control register is not guaranteed to be what you read back.

Requirements

Let’s get the requirements out of the way. You will need:

  • Windows 2000 or newer. Should work with 2000, XP, Vista, 7, 8, 10, and the various newer server versions. 32- or 64-bit Windows are both supported.
  • Microsoft .NET Framework 2.0 or newer
  • Inpout32.dll

Note that I am linking to the best version of Inpout32.dll. It should be compatible with all versions of Windows supported by my program. If you are using Windows Vista or newer, you will need to run the InstallDriver.exe program inside the Win32 directory of Inpout32’s distribution in order to install the driver. You only have to do this once, and it’s just so you can get administrator privileges in order to install the driver. Even if you are on a 64-bit operating system, that’s OK. Still run InstallDriver.exe from the Win32 directory.

Put Inpout32.dll from the Win32 directory into the same directory as ParallelPortTester.exe. Don’t use the x64 directory; that DLL would only be for a 64-bit program, but Parallel Port Tester is not a 64-bit program.

Download

OK, so you’re ready to download it? Here you go. Make sure you also get Inpout32.dll and install it as described above, because it’s not included with my program.

ParallelPortPicture_256

Download Parallel Port Tester version 1.0.0.2

Version History

  • 1.0: Initial release
  • 1.0.0.1: Improves parallel port detection algorithm; previous algorithm was incorrect in certain cases.
  • 1.0.0.2: Fixes a bug that was causing a crash for some users.

Any problems/questions/concerns? Please let me know in the comments below and I’ll try my best to help get you going. Be careful; it might be possible to fry your parallel port if you hook the outputs up wrong. I’m not responsible for any damage done to your computer by using this software.

For sample code that describes how I detect the computer’s parallel ports in Parallel Port Tester, see my blog post: Detecting parallel ports and their I/O addresses in Windows.

Trackback

39 comments

  1. Dick Grubb @ 2014-03-08 11:25

    Hi Doug,

    I have been trying to equip my Win 7 64 PC to run some old Analog Devices software that wants to communicate with an eval card via a parallel port. I installed a Rosewill RC303 PP PCI card which seems to function Ok, but it puts the port address up at 0xD030. Your Parallel Port Tester finds it and I can toggle all the pins. Thanks for a great piece of software. However the AD softwate does not seem to be able to deal with the non standard port address. I installed Windows Virtual Machine and their XP OS for it. Under XP running virtual the port appears at 378h according to the Device Manager but the AD software still does not find the port.

    I tried to install your test software in the XP OS running virtual to see what was happening, but I have been unable to get it to load. It throws an error “unable to initialize”. I am using the recommended version of inpout32.dll. Do you know of anybody else’s experience of running your software in the virtualized XP OS?

    Sorry for the long winded question. Thanks,

    Dick Grubb

  2. Hi Dick,

    Yeah–the nonstandard port addresses always throw a curveball with older programs 🙁 Good idea on making an XP virtual machine, as long as the VM software you’re using supports forwarding parallel port access. I believe I’ve tried the software in a Windows 8 VM (with VMware Player) in the past and it worked. I am pretty sure I’ve also tested it on a real Windows XP computer. It does require .NET. Have you installed .NET framework 2.0 or newer? I don’t believe XP came with it by default. If that doesn’t work, you might want to consider trying VMware Player.

  3. Hi Doug,

    Would it be possible for me to take a look at your source code for this project? I downloaded your program and it works great with my card and relay board. I’m writing a simple program in c# to do the same thing. However when I run my program the led on the relay lights up then shuts off again. It should just stay lit. Any help would be great!

    Thanks

  4. Hi,
    I’ve been trying to run the program on Win7 64bit, after installing Inpout.dll as mentioned. When I run it, I only get the “ParallelPortTester has stopped working. Windows is checking for a solution” error. Any idea what could cause that?
    Thanks,
    Nitzan

  5. Hi Nitzan,

    Unfortunately I’ve never seen that problem before. I’m not exactly sure what would be causing it to happen. I’ve seen that happen in the past if I run a .NET program on a computer without .NET installed, but Windows 7 would come with .NET installed already. I could try to build some other binaries for you to help find exactly where it’s crashing, but I won’t be able to get around to that until next week if you’re interested.

  6. Hi Doug, your program is amazing and works fine. I’m trying to achieve parallel port detection in my program and I was wondering if you could share your experience about this.

    Thanks a lot.

    Regards,

    Arc.

  7. Hi Arc,

    I’ve gotten several requests and just haven’t had time to fully describe the detection until now. I just wrote a new blog post about how to detect parallel ports. It describes the algorithm I use in Parallel Port Tester. I hope this helps!

  8. Hi Doug, thansk for your fast answer. I finally managed to do it through WMI yesterday. I just missed replacing the two backslashes.

    Your post is very helpful though and much more optimized than mine.

    Fantastic job Doug!

  9. Chris Dancer @ 2014-12-10 09:55

    Hi Doug,
    I tried to run the program on my Win XP 32-bit machine but get the error parallel port tester has encountered an error and needs to close. I have put the recommended 32-bit InpOut32.dll in the program directory.
    Any ideas?

  10. hi Doug,

    thanks for this great piece of software, it works perfectly on windows 8.1! Unfortunately i tried to run your program on a virtual machine using vmware with windows XP sp3 and it doesnt work yet, it crashes with a standard ms message: “ParallelPortTester has encountered a problem and needs to close. We are sorry for the inconvenience.” Net Framework was successfully installed on this vm, any hint?

    thanks in advance

    Simone

  11. Hi Chris and Simone,

    I am able to reproduce this problem in my VMware virtual machine running XP. I’ll see what I can do to fix it. I’m not sure exactly what’s causing it.

  12. Hi again,

    I found the problem. It’s actually fairly embarrassing — there was some debugging code in earlier versions of the program that I accidentally left in. For some reason, the thing I was trying to debug seems to be nonexistent in at least some installs of XP (I swear, this program was working fine on my other computer with XP). I simply removed the unnecessary debugging code, and now everything is working fine in my VMware install.

    I have updated this post with version 1.0.0.2 which should fix the problem. Hopefully, it will fix the crashing bug for you too!

  13. hi Doug,

    it works! 😀 perfectly, it seems like my parallel port is working on XP too 😀

    thank you very much!

    mmm.. do u have a paypal account for donations? 😀 i owe you a beer

  14. Doug

    I think your test program is what I am looking for to directly write to the lpt port in windows 8.1 . I am wondering if your program has any “arguments” or “switches” so it can be launched with a shortcut or batch file and have outputs change state. For example if i have a relay attached to an output pin of the lpt port and i want to control it with a batch (cmd) file is there a way to use the port tester or will it only work manually?

  15. Unfortunately it does not have any switches for running automatically from a batch file. I’d recommend writing a small program that uses a library like Inpout32.dll to do it.

  16. Hi,

    would you have any idea why all input pins of the parallel port (including the 4 control pins) stay green irrespective of the input given?
    I have a 64bit windows 7, tried already 2 parallel port pc cards using different slots on the mainboard and different drivers – but the ttl pulse on the acknowledge pin 10 remains invisible for the pc…
    Also 4.5 Volt DC current stimulation (series connection of batteries, one wire into a female connector for ground, other wire into a female connector for an input pin) yields no change from green to black, on none of the female connectors, i.e. for no input pin…
    Have you ever seen something like that? What do i miss?

    Thanx for any idea,
    susanne

  17. Have you tried directly connecting an input pin to ground to make it go black? If the input pins don’t go black when you ground them, I’m not sure what would cause that…

    Have you verified the cards are set up to work in SPP (standard parallel port) mode? Other modes might not work the same way.

  18. Hi,

    the trick was to activate the cards plug-and-play mode in the windows device manager – even though it was correctly installed and shown as functional, it didn’t work properly before chosing legacy plug-and-play mode…

    Thank you so much for your help!!!
    susanne

    PS: I already recommended your software to four IT guys with whom i discussed the problem and all of them really liked it! 🙂

  19. Bruce Peters @ 2017-07-18 23:16

    Hi Doug,

    Do you have any experience, or can you offer any advice about running your Parallel Port Tester under Windows 10/64?

    I’ve gotten tied up in a customer support snafu and was hoping to use your tester on their Win10 system to double-check what was actually getting written to the port.

    Thanks,
    Bruce

  20. Hi Bruce,

    I haven’t tried it myself, but as far as I know it should work fine. The only reason I didn’t list Windows 10 as compatible is because I wrote the program before it came out. As long as Inpout32 works properly, Parallel Port Tester should too. If you end up determining that it doesn’t work, please let me know and I will investigate.

  21. Hi again Bruce,

    I just tested in a Windows 10 64-bit VMware virtual machine on a Linux guest with Inpout32 1.5.0.1, and Parallel Port Tester appears to work just fine. I will go ahead and update the compatibility information on this page to add Windows 10 as a compatible OS.

  22. joe ceri @ 2018-10-29 11:18

    Doug,
    How do I access inpout32.dll from a legacy machine language program that has an OUT DX,AL, with DX=0378h.
    Your parallel port tester works great. I have inpout32.sys in the \system32\drivers file of windows7, but that apparently is not enough.
    Joey.

  23. Will this work on dos 6.2 and/or windows 3.1?
    We have an old 486 computer that runs a coil winder machine. We replace a crashed hard drive and reinstalled the software and files on the replacement drive, but the coil winder doesn’t run. We are trying to determine what the problem is and want to test the Parallel port.

  24. Unfortunately this only supports modern-ish operating systems. I’m sure there are other, older programs that will work on hardware that old.

  25. I just bought a sunix pci parallel port board (SUN1989 chip) It installed fine on windows 10 and I can see it in device manager. When I try your parallel port tester it will not detect anything. I stepped through the code laid out in your other blog. I can find the port by name LPT3, but when it gets to finding the associated resources it find nothing. resourceQuery looks like ASSOCIATORS OF {Win32_PnPEntity.DeviceID=”SNXPCARD_ENUM\\SNXPCARD_PARPECP\\1FD4&1999_01001FD4_0000E4_PORT0″} WHERE ResultClass = Win32_PortResource.
    I saw a comment about turning on legacy plug and play on the card, but no difference.

    Do you have any tips for me?

  26. Hi Bart,

    Hmm, I’ve never seen a port that fails to auto-detect. Very interesting. In Device Manager, what does LPT3 show on the Resources tab? There should be an I/O range there. If you find one, you should be able to enter the beginning of it manually in the “Port:” combo box at the bottom right corner of the window.

  27. Hi Doug,

    If I look in device manager I find “SUNIX LPT port (LPT3)” but I could not find any resources shown. After some digging in the manual I finally noticed a screenshot showing that for the resources I had to look under multifuncton adapters which shows a “SUNIX 1-Port Parallel Card”. This node defines a resource number (0xC020) which when typed in your application dropdown gives me the parallelport status. It works, but it seems I will need a different resource query for this adapter than your code provides for. To bad I find WMI very untransparent

  28. Hi Bart,

    That’s really weird. This is the first time I’ve seen a parallel port chipset where the LPT device itself doesn’t have the address range associated, and instead it adds a separate device in a different section of Device Manager that has the I/O range.

    If there is some way to programmatically get a reference to the associated “SUNIX 1-Port Parallel Card” Multifunction Adapters object by starting from the LPT3 port object, I could add a special case for this chipset into Parallel Port Tester for SUNIX cards and update my blog post. Unfortunately I don’t have a card that uses this chipset so it’s going to be difficult to look into it.

    Does the Win32_ParallelPort class work properly for detecting the address? I ended up disabling its detection because it was broken in certain cases. I wonder if it properly detects the port.

  29. No, you were quite right about Win32_ParallelPort, that one does not work at all.
    When I remove Win32_portresource from the where of the resourceQuery I get four results.
    The classnames are as follows. CIM_Datafile, Win32_Bus, Win32_ComputerSystem and win32_systemDriver. (for the record I’m running win10 x64).

    If I get more information about it I will forward it here. Thanks for replying

  30. Thanks Bart. If you figure something out, please let me know so I can update this program (and my instructional blog post) with a workaround for these cards. Honestly I feel like the chipset manufacturer is doing it wrong by not putting the port address as part of the port itself…

  31. I downloaded wmiexplorer 2.0 from github and basically search for sunix and win32pnpentity. That got me two items
    SELECT * FROM Win32_PnPEntity WHERE Caption like ‘%SUNIX%’
    The first one class ports and the second one class multifunction (I believe this card is also sold in variant with a second parallel port and maybe some serial port).
    Direct query for multifunction:
    SELECT * FROM Win32_PnPEntity WHERE Caption like ‘%SUNIX%’ AND ClassGUID=”{4d36e971-e325-11ce-bfc1-08002be10318}”
    I can than do an query for its associators (all learned from your post)
    ASSOCIATORS OF {Win32_PnPEntity.DeviceID=”PCI\\VEN_1FD4&DEV_1999&SUBSYS_01001FD4&REV_00\\5&29DF5497&0&0000E4″}
    and that gets me several port resources among which is the correct one.

    I have little Idea about WMI an no clue how to “jump” from one device to the other. So I do not think this is to usefull for you, other than if you meet someone with a similar card. I will mail the manufacturer, but I don’t expect much from that.

    Thanks again.

  32. joe ceri @ 2019-10-29 17:32

    I have tried your parallel port tester and it works great.
    I would like to read/write from the port(0378h) using an assembly language subroutine which would be callable from higher level programs. Can you tell me the calling sequence and argument arrangement for Inpout32 or is that only available in C?
    Joe

  33. Hi Joe,

    I don’t know off the top of my head, but you should be able to figure out the calling conventions of Inpout32 by looking at its header file. With that, it would be possible to call it from assembly. At the very least, you could just write a simple C program that calls it and then see what the generated assembly does.

  34. joe ceri @ 2019-10-30 11:58

    I don’t have a c compiler. I don’t code in c. I still code in fortran and call assembly language subroutines.

  35. joe ceri @ 2019-11-01 01:11

    Did you code a subroutine to handle the OUTP calls to the port? If so, can I see this subroutine?

  36. Hi Joe,

    Unfortunately that’s beyond the scope of Parallel Port Tester. I’d suggest checking out any Inpout32 documentation/examples.

  37. Hi Doug,

    Would you please give a “for dummies” type tutorial to a layman like myself, who has no programming skills, on how to interpret your software results? For example, which pins should be green and which black on a healthy parallel port?

    I’m in a world of pain trying to get two CAD programs in a VMware Player Windows XP guest VM to recognise their respective Sentinel dongles (hardware locks/keys) plugged into a parallel PCI (not PCIe) card on the host. The card has jumpers, currently set to IRQ 278.

    Frustratingly, both dongles work just fine on one computer, a Dell T7610 workstation, but refuse to get recognised on a newer T7910. Both machines have almost identical specs, identical PCI cards, and Windows 10 64-bit build 1809. By the way, I have also swapped out the PCI cards to make sure that neither was dead, but the problem persists. Help!

    Brian

  38. Hi Brian,

    I don’t have time to do a comprehensive tutorial, but I can try to do a brief overview. There is no right answer for what pins should be green and black — it’s going to depend on what signals are coming into your port.

    All of the pins labeled as “Output” are under your control. You can click them to toggle between on and off. When you do this, you should notice the voltage change on the corresponding pin on your parallel port. You can measure this with a multimeter in voltage measurement mode. You should see something like 3.3V or 5V if the pin is green, and 0V if it’s black.

    The input pins will automatically change between black and green based on the detected input voltage. You should be able to feed in one of the output signals to an input by hooking their pins together, and the input will change as you change the output.

    The pins that are input/output can be configured to be either an input or an output, and they behave as described above.

  39. Thanks for the quick reply Doug. I think it’s best if I leave things alone then, since I do not have confidence in my own technical abilities. The last thing I want is to make things worse!

    Brian

Add your comment now