PORTS Forum

Ports and Interfaces => Parallel Port => Topic started by: Rightia on January 15, 2016, 05:40:51 pm

Title: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Rightia on January 15, 2016, 05:40:51 pm
I have faced a strange behavior of the pin number 4!
When I connect one of the status pins to the ground, pin number 4 turns on automatically!
Does anyone know why it happens? How can I prevent  the pin 4 to be activated without my command while I am sending input via status pins?
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Jan Axelson on January 15, 2016, 05:58:17 pm
See if anything here helps:

http://janaxelson.com/forum/index.php?topic=662.msg2382#msg2382
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Rightia on January 16, 2016, 07:33:39 am
Unfortunately, I couldn't find any helpful information about it!
Any idea how I can solve this problem?
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Jan Axelson on January 17, 2016, 02:04:25 pm
You've done all of these:

Set the port to SPP or PS/2 mode in the system BIOS.

Configure the data lines as outputs by writing zero to bit 5 of the control port (base address + 2).

Set DisableWarmPoll in the registry as described in my FAQ.

and you still see the problem?
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Rightia on January 18, 2016, 04:35:08 am
It still doesn’t work!

- I configured the data lines as outputs.
- I disabled DisableWarmPoll in the registry. (so, it is now 00000001)
- However, I cannot find SPP or PS/2 in the system BIOS. I only have EPP+ECP, Output_Only, and Bi-Directional.
What can I do for this part?
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Jan Axelson on January 18, 2016, 09:36:48 am
Use Output only if possible, otherwise bidirectional.
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Rightia on January 19, 2016, 04:55:57 am
I set it to Bi-Directional and I still have the problem!
When I close the switch of the pin 13, the pin 04 goes high automatically!


                220 ohms    LED
Pin 04 -------^^^------|>|------|
                                              |
                           switch          |
Pin 13 ----------------/ ----------|
                                              |
                                              |
Pin 25 ----------------------------|
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Jan Axelson on January 19, 2016, 09:30:44 am
Have you written zero to pin 4?
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Rightia on January 19, 2016, 11:51:42 am
Yes, and before I press the switch, the LED is off.
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Jan Axelson on January 19, 2016, 09:18:29 pm
In bidirectional mode, S4 is XFlag, which goes high to indicate support for using the data lines as inputs. It looks like the port driver is responding on detecting XFlag's going low.

If you set the port to output-only in the BIOS, you can still use the status bits for inputs and the driver won't try to negotiate other modes. That's what I would try next.

Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Rightia on January 21, 2016, 05:09:16 am
I set it to Readout-Only and I still have the problem!
Don't you have this problem with your own parallel port?
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Jan Axelson on January 22, 2016, 09:49:27 pm
I don't recall ever seeing this problem or anyone's posting about it here. However, I haven't used a parallel port in a while and no longer have any PCs with them.

You've done everything I can think of to keep the pin from responding.
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Rightia on February 03, 2016, 07:39:29 am
Thank you so much anyway!
Still one more question:

For solving the problem you said: "Configure the data lines as outputs by writing zero to bit 5 of the control port (base address + 2)."

The program with which I am working doesn't let me change any codes there. Is there any way to configure the data lines as outputs in the registry of Windows XP?
Title: Re: Pin 4 goes high automatically when one of the status pins connected to the GND!
Post by: Jan Axelson on February 04, 2016, 09:56:21 am
Output is the default state for the data lines. Unless your code or some other driver code is changing it, the lines will be outputs.

If you select Output only in the BIOS, the data lines will always function as outputs.

If you would like to describe in more detail what you are trying to accomplish with the port, we might be able to suggest the best approach.