PORTS Forum
Ports and Interfaces => Parallel Port => Topic started by: Knight2000 on January 27, 2012, 05:33:05 pm
-
Hello everyone,
I'm trying to access my parallel port's data pins with a C# program I created. My programs works fine on windows xp pro with the built in parallel port. The problem I'm having is I'm currently trying to use the same program on Windows 7 with the use of a PCI parallel port card. I'm running Windows 7 32 bit. I've installed the parallel port card and updated the drivers for it with no problems. In device manager the cards shows up and has a I/O range which i converted to decimal form. The decimal for the card's I/O address is 33920. When i ran my program and enter 33920, 255 I did not get a response from the parallel port using a multimeter. I've already added the inpout32.dll to the system 32 folder but still not luck. Is this possible to do in Windows 7? If so could you point me in the right direction on how to accomplish this? I've been told that a PCI parallel port will not work with windows 7....is that true?
Thank you.
-
You can set control port (base address + 2) bit 5 = 0 to be sure the data outputs are enabled. Also set the port to SPP or PS/2 mode in the system BIOS.
I don't know if these will help or not.
Port bit information:
http://www.janaxelson.com/files/ibmlpt.txt
Jan
-
Thank you for the info Jan. I don't have that much experience with interfacing parallel ports. Is there a step by step tutorial you could provide me in setting the base address and also the port to spp or ps/2 in the bios? I don't understand "base address + 2" bit 5 = 0.
Thanks again! :)
-
Pseudocode.
Read the control port.
i = inp(33920+2)
Set bit 5=0 and write the value back out.
out(33920+2, i AND DFh)
Look up "boolean logic" if you need help.
And:
http://www.tomshardware.com/forum/26654-35-going-bios-modify-parallel-port-settings
Jan
-
You can set control port (base address + 2) bit 5 = 0 to be sure the data outputs are enabled. Also set the port to SPP or PS/2 mode in the system BIOS.
I don't know if these will help or not.
Port bit information:
http://www.janaxelson.com/files/ibmlpt.txt
Jan
Jan- I've been using some PCI & PCIe parallel ports which use the MOSCHIP 9805 chip.
(I would suspect this is pretty common behavior for plugin parallel ports)
These cards don't have a BIOS, nor does the system BIOS let you change any settings.
The documentation is worthless. I don't know if my cards support bi-directional operation or not.
-
The chip's data sheet explains how to set the mode.
http://www.moschip.com/data/products/NM9805/Data%20Sheet_9805.pdf
Jan
-
The chip's data sheet explains how to set the mode.
http://www.moschip.com/data/products/NM9805/Data%20Sheet_9805.pdf
Jan
Thanks.
That's odd. When I went to the Moschip site, it redirected me to asix.com.tw for all downloads for that chip.
-
You can set control port (base address + 2) bit 5 = 0 to be sure the data outputs are enabled. Also set the port to SPP or PS/2 mode in the system BIOS.
I don't know if these will help or not.
Port bit information:
http://www.janaxelson.com/files/ibmlpt.txt
Jan
Jan
"You can set control port (base address + 2) bit 5 = 0 to be sure the data outputs are enabled. Also set the port to SPP or PS/2 mode in the system BIOS."
With the PCI & PCIe parallel port cards that I have been using, there are no BIOS settings to change.
Is it still possible to configure these cards for bidirectional operation?
Thanks
-
The port likely defaults to ECP mode, which incorporates the legacy SPP/PS/2 registers (base address, base +1, and base+2). So you should be able to do basic I/O on the base address.
Jan
-
The port likely defaults to ECP mode, which incorporates the legacy SPP/PS/2 registers (base address, base +1, and base+2). So you should be able to do basic I/O on the base address.
Jan
So you should be able to do basic I/O on the base address
This wasn't working for me. After reading parts of PP complete and other articles on your website, it looks like I need to set (or clear) bit 5 in the Control register.
I'm hoping to get time to do that this week. Not being able to read from the data register on the PCI cards I'm using is going to break my project.
-
Yes, you need to set control port bit 5 to configure the data port as output (0) or input (1).
Jan
-
hello
PLZ help!!!
am using spp mode parallel port and i want to use data bins as input reading from ADC
i know that i must set bit 5 of control register =1 for input
but that dont work it read last data written to data register !!!
PLZ help
-
Spp mode is output only (data bits). Use ps/2 mode or ecp mode.
Jan