Author Topic: Windows 7 64bit Parallel port access issue  (Read 12954 times)

dgdaley

  • Member
  • ***
  • Posts: 3
Windows 7 64bit Parallel port access issue
« on: September 26, 2012, 08:05:05 am »
Some time ago I purchased Parallel Port Complete which was very good.  I was building a system which would make a PC act like a glass printer using the parallel port as an input device. Since my software could not poll fast enough to keep up with the strobe, I designed and built a hardware latch which sets the busy bit high when the strobe fires and keeps it high until my software acknowledges the data.  I used the inpout32.dll to access the registers.  This system has been working well for about a year.  I am trying to port the system to Windows 7 64 bit system. I have set up the inpoutx64 driver  so that the operating system is detected and the proper drivers are loaded.  This all worked fine on the 64 bit system for a week or so then I started getting a value of 4 every time I retrieved the data register. I have changed the cable, the data latch, the print server, and the 64 bit computer.  I have also tested the software on a 32 bit system to be sure it was not a code issue. I thought it could be the windows port driver so I rebuilt the machine with the restore disk and stepped through the code.  The code detects the busy, reads and stores the data register, then ack the port.  However the data register always returns the value 4.
>      When working on the 32 bit system I found that windows occasionally checks the port and resets the control register which was causing random characters from time to time, this was resolved by setting the control register just before reading the data register. I don't know if Windows 7 64 is doing something like this? I do still set the control reg before reading data.
>      I hope you may have some thoughts or can point me to some information to help me resolve this issue.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2803
    • Lakeview Research
Re: Windows 7 64bit Parallel port access issue
« Reply #1 on: September 26, 2012, 01:13:46 pm »
No idea if this is the problem, but see this question in my FAQ:

Q: If a logic 1 is written to the Control Port, bit 0, (Strobe), the PC clears all of the port bits once every five seconds for about a minute.

http://www.lvr.com/jansfaq.htm

Also see

http://www.downtowndougbrown.com/2010/10/sivava-willem-eprom-programmer-on-windows-7-64-bit/

Let us know if it works.


dgdaley

  • Member
  • ***
  • Posts: 3
Re: Windows 7 64bit Parallel port access issue
« Reply #2 on: September 27, 2012, 11:03:29 am »
Jan,
    Your first link looked promising however when I went into regedit on my system I found [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Parport] but there was no Parameters option as outlined in the post. [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Parport\Parameters]  I tried to google DisableWarmPoll to see if it was in another location on the Win 7-64 systems but only found the same info you provided.  The second link while interesting did not seem to provide what I need.  I am writing the application for business use by my company and do not want to cobble something together that I do not have 100% confidence in. I would like to try the Registry fix if anyone knows where in the Windows 7 64bit registry to do so. I am using HP desktop system with the OEM Windows 7-64, I have an HP same model with OEM Windows 7 32bit and it also does not have the registry entry.   

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2803
    • Lakeview Research
Re: Windows 7 64bit Parallel port access issue
« Reply #3 on: September 27, 2012, 12:07:09 pm »
That setting might be obsolete on Windows 7. It's possible that the OS is trying to detect an attached device and negotiate a mode, however.

You could look in Device Manager for a setting that might help. You may need to do something to get the port to show up:

http://answers.microsoft.com/en-us/windows/forum/windows_7-hardware/ports-com-and-lpt-not-in-device-manager/4a345aa2-e5b4-4368-854b-6fdaa512610e

If you're making something for professional use, I would suggest moving to USB. FTDI's FT245 series has digital I/O and requires no knowledge of USB protocols.

dgdaley

  • Member
  • ***
  • Posts: 3
Re: Windows 7 64bit Parallel port access issue
« Reply #4 on: September 27, 2012, 03:00:10 pm »
Jan,
    Thanks for the quick reply.  I checked the device manager and there are no new options in it.  The port shows up just file.  I connected a monitor in line to verify that with each strobe the data sent in changes however every time I read the data from the data register the value returned is always 4.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 2803
    • Lakeview Research