Author Topic: PCI Parallel Port and Windows 7 32 bit  (Read 51520 times)

Knight2000

  • Member
  • ***
  • Posts: 2
PCI Parallel Port and Windows 7 32 bit
« 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.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #1 on: January 27, 2012, 06:43:40 pm »
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
« Last Edit: June 27, 2015, 09:41:58 am by Jan Axelson »

Knight2000

  • Member
  • ***
  • Posts: 2
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #2 on: January 28, 2012, 01:37:06 pm »
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! :)

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #3 on: January 29, 2012, 09:17:45 pm »
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


cappy2112

  • Member
  • ***
  • Posts: 10
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #4 on: February 22, 2012, 01:10:27 am »
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.
« Last Edit: June 27, 2015, 09:50:03 am by Jan Axelson »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #5 on: February 22, 2012, 10:29:04 am »
The chip's data sheet explains how to set the mode.

http://www.moschip.com/data/products/NM9805/Data%20Sheet_9805.pdf

Jan

cappy2112

  • Member
  • ***
  • Posts: 10
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #6 on: February 22, 2012, 01:34:12 pm »
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.

cappy2112

  • Member
  • ***
  • Posts: 10
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #7 on: February 23, 2012, 03:30:15 pm »
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

Quote
"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

« Last Edit: June 27, 2015, 09:50:17 am by Jan Axelson »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #8 on: February 23, 2012, 05:41:50 pm »
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

cappy2112

  • Member
  • ***
  • Posts: 10
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #9 on: February 24, 2012, 12:44:09 pm »
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

Quote
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.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #10 on: February 24, 2012, 01:47:58 pm »
Yes, you need to set control port bit 5 to configure the data port as output (0) or input (1).

Jan

eng dodi

  • Member
  • ***
  • Posts: 2
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #11 on: June 18, 2012, 06:11:58 pm »
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

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: PCI Parallel Port and Windows 7 32 bit
« Reply #12 on: June 18, 2012, 08:24:01 pm »
Spp mode is output only (data bits). Use ps/2 mode or ecp mode.

Jan