Input format for <ADDRESS> and <DATA>

My x64 port of InpOut32
Post Reply
New User
Posts: 2
Joined: Mon Sep 11, 2017 7:14 pm

Input format for <ADDRESS> and <DATA>

Post by aspsee »

Dear Phil,

I am currently trying to get InpOut32 to work on an Intel-based windows 7 / 64-bit system. My parallel port is on a StarTech PCI1PECP PCI board. The x64 driver seems to install without problem. The version is v1.5.0.1.

I downloaded your C++ sample code and it has proved valuable in understanding the workings of the driver (as it seems it cannot be modified any longer because of signing problems). Everything seems to be working fine when using this example code, because wheter I try to write or read, the program does not give me any errors, and confirms that the operation was successful. However, I am monitoring the output pins of my parallel port cable using a voltmeter and I can't seem to get InpOut32 to write to them. Pins 2-9 are all on logical 0 (0V relative to ground pin 25; Strobe pin is +5V, so I know my PCI card is getting power). I have been trying to write 255 (that is the actual value that I input as a <DATA> argument to the software using the command line, which should set pins 2-9 to 11111111, or all +5V). My parallel port is assigned to LPT3 with base address 0xFFF8-0xFFFF.

I have been trying different ways to input the <ADDRESS> data in the command line, but none seem to work. They all give me the positive response that data was written to the correct address, but all my pins remain at 0V. I have been tweaking the sample code to get information about how the driver handles the input data. The driver writes the port address as two bytes in the Buffer[] array at indexes 0 and 1. I figured that since the argument is converted from string to short to LOWORD, I would need to input 65528 as the <ADDRESS>, which would then be written as 0xFFF8 in Buffer array. However, this does not seem to work, as all my pins remain at 0V. I have tried incrementing the address up to 0xFFFF in order to cover the whole address range, but none work.

I am starting to think that InpOut32 might simply not be compatible with my PCI card, but I wanted to make sure I was using the right input format. Also, I saw you briefly mentioned at other places on the forum that InpOut32 only works with certain PCI cards, depending on the way they expose their ports. I was wondering if you could elaborate on this subject.

Thank you for your help!

User avatar
Site Admin
Posts: 6762
Joined: Sun Apr 06, 2003 11:12 pm

Re: Input format for <ADDRESS> and <DATA>

Post by phil »

Firstly, many PCI cards do not work with InpOut32 - some people have had success but I don't have a definitive list of cards that work vs cards that don't (its not a very big community!).

I need to remind you that I only ported InpOut32 to x64, I didn't write it and I don't pretend to know very much about drivers or kernel land. So I cant really explain why, I was told by the original author that it didn't work. I suspect its related to 32bit addresses but I'm not sure.

Can you try potting the port on LPT1 (0x378) to see if that makes a difference?

When entering address try both the decimal number and the hex number just to be safe... I cant remember if the CLI on the test program takes the number as hex of decimal (and I haven't got time to check the code right now).

*** This may not be relevant see below!*** Secondly, have you put the port into the right mode? In order to write to the data pins, I think you need to change the parallel port mode (its been 18+ years since I looked into this so my mind is a little rusty), but in normal mode, I think you can only write to the control pins (5 of them) and you need to use a different port address than reading the data port...

Things to try:

Are you sure the driver is installed? Did you run IntallDriver.exe in the 32bit folder? To install the driver you need to be elevated (administrator) which InstallDriver.exe forces.

IIRC, Inp and Out don't have any response form the kernel to indicate success, other than it throwing errors if it cant talk to the driver.

The easy way to find out (if you have a speak attached to the PC beeper, would be to write the the beeper port (not a sound card) - although these days even that is becoming uncommon...

I think my .NET samples have and option to make a noise on the PC speaker (if your PC has one) so thats worth a try, I think the download has the compiled binaries in the \debug and \release folders but if not you should be able to compile it in any recent version of visual studio express (2005 onward I think)

Lastly, if the driver is working, then try monitoring the data control pins and write to the control port. Do some research on parallel port modes (ECP/EPP) to see if there is something you have to do to enable bi-directional mode as write to the 8 pin ports. As I say that, Im thinking that maybe its reading the data ports that is the problem, not writing to it (as in, by default I would expect to be able to write to it as thats how the printers work - so everything I have just said may be pointless - I'll leave it there in-case it sparks some thoughts on your side :)).

As you can probably tell, InpOut is not really very relevant to me these days, I originally ported it because I used it to control a custom serial baud rate - but ve not used it myself for over 10 years, and Ive never used it for LPT (other than a quick test with an old parallel LCD screen many years ago!

--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

New User
Posts: 2
Joined: Mon Sep 11, 2017 7:14 pm

Re: Input format for <ADDRESS> and <DATA>

Post by aspsee »

Hi Phil,

Never mind about the "Please elaborate on this..." part of my post, I just read the earlier posts on the discussion "INPOUT32/x64 Works with SOME PCI cards" thread, and it answered most of my questions.

However, I am still interested to hear about input formats!


Just saw your post, will read it carefully!!

Thank you,


Post Reply