Q about (ab)using a PC's parallel port

J

Jan Panteltje

**** Post for FREE via your newsreader at post.usenet.com ****

The original IBM AT serial/parallel adapter has an internal pullup
resistor on the -ACK input. Measuring the voltage on pin 10 should
confirm if it is tied to +5V or if it is floating. I can't imagine it
would be floating, as this could generate spurious interrupts (?).
Assuming pin 10 is pulled up to +5V, I would then use an optocoupler
(eg 4N2x) to provide isolation between your PC and your signal source,
for total peace of mind, and to avoid earth loops, etc.
Please note that many mobos these days poutput 3.3V (that is what the
chipset runs on).

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
*** Usenet.com - The #1 Usenet Newsgroup Service on The Planet! ***
http://www.usenet.com
Unlimited Download - 19 Seperate Servers - 90,000 groups - Uncensored
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
N

Norm Dresner

larrymoencurly said:
"Norm Dresner" <[email protected]> wrote in message


Several years ago, I was able to buy a used FIC PA-2007 mobo cheap
because its serial ports didn't work. I found that a couple of
surface mount capacitors in the circuit that converted between TTL and
serial port voltages were missing, and installing new capacitors fixed
them. But a few months later a friend of mine plugged or unplugged a
parallel printer while everything was turned on, and again the serial
port went bad, and those capacitors disappeared. The south bridge
handled both the parallel and serial ports, and new capacitors fixed
everything again.

Would it hurt to put a low-value resistor in series with the signal
line and a zener and a reverse diode for protection?

If you read the rest of the OP, you'd have seen that the solution we adopted
was to put a resistive divider on the input signal to limit the PC's input
to 5v. In this particular application the input signal was not going to
change -- this was an embedded system and the signal source was a high
quality Inertial Navigation System's 1PPS output from its GPS receiver --
and I felt that it was a sufficient cure for the problem. Yes, there are
many more general solutions to be found -- and adding a zener would have
been one of them but considering the electronic sophistication of the person
who asked the question (if you have to ask if 10 v into the parallel port
presents a potential problem then you simply don't understand what's there),
trying to describe how to reverse bias a zener was impossible to do over the
phone. A solution to a problem not only has to fit the problem but the
people who will implement it.

Norm
 
B

budgie

A 5V1 zener clamp is not equivalent to clamping the signal to the PC's
5V rail with a diode. Just think about what happens when the PC is
switched off with the external device still on. The original IBM
implementation of the parallel port used TTL logic chips (LS series).
These do clamp the input signals to the rails, so feeding in 5V with the
PC turned off could harm the PC. Contemporary interface chips may be
implemented differently, they might be able to tolerate 5V regardless of
whether they are being powered or not.

Maybe we are talking of different configurations here. With a diode clamp to an
external 5V rail (not PC-derived) I would be using a resistor on the signal
input (obviously) and one between the clamp point and the PC input pin. Any
risk of PC damage is mitigated by that resistor limiting current into the
de-powered PC post.
If you're not depending on maximum speed you may resort to a solution
others have proposed, namely to rely on the ACK pin being pulled up in
the PC, and using an open collector driver (or just a transistor) to
drive it.

I use the PC-derived rails on my in-house projects.
 
F

Franc Zabkar

If you read the rest of the OP, you'd have seen that the solution we adopted
was to put a resistive divider on the input signal to limit the PC's input
to 5v. In this particular application the input signal was not going to
change -- this was an embedded system and the signal source was a high
quality Inertial Navigation System's 1PPS output from its GPS receiver --
and I felt that it was a sufficient cure for the problem. Yes, there are
many more general solutions to be found -- and adding a zener would have
been one of them but considering the electronic sophistication of the person
who asked the question (if you have to ask if 10 v into the parallel port
presents a potential problem then you simply don't understand what's there),
trying to describe how to reverse bias a zener was impossible to do over the
phone. A solution to a problem not only has to fit the problem but the
people who will implement it.

Norm

IMO the resistive divider solution is a poor one. If the -ACK pin is
tied high, then the pullup resistor will prevent the input from
switching all the way to ground. The original IBM AT had two 4K7
pullup resistors in parallel, resulting in an effective resistance of
2K35. Let's assume you use two 2K2 resistors in your divider. In this
case the low voltage at the -ACK input will be 1100 / (1100 + 2350) *
5 = 1.59V. This value is in TTL limbo. Of course you could experiment
until you get the numbers "right", but your solution won't necessarily
be portable.


- Franc Zabkar
 
N

Norm Dresner

Franc Zabkar said:
IMO the resistive divider solution is a poor one. If the -ACK pin is
tied high, then the pullup resistor will prevent the input from
switching all the way to ground. The original IBM AT had two 4K7
pullup resistors in parallel, resulting in an effective resistance of
2K35. Let's assume you use two 2K2 resistors in your divider. In this
case the low voltage at the -ACK input will be 1100 / (1100 + 2350) *
5 = 1.59V. This value is in TTL limbo. Of course you could experiment
until you get the numbers "right", but your solution won't necessarily
be portable.

You've obviously ignored the statement that this is not a general solution
but was dependent on the particulars of the specific implementation. The
device that was connected directly to the output port of another device whic
h switched its output between (very close to) zero and 10v. This was not
connected to an "original IBM AT" and I doubt that the ASIC on the
motherboard in the embedded computer had much of anything in the way of
resistors but if it did it was inside a CMOS ASIC and it's very unlikely
that the resistance was much lower than several 10's of K Ohms.

But the actual proof that it was the right solution is that
a) the programmer who I described it to over the telephone was able to
implement it
b) it not only worked, but has been working AFAIK 24 hours a day for the
last two weeks.
I'm not going to ask much more of a solution that that kind of performance
in this situation.

I certainly could have created several sophisticated protection circuits if
I was the one doing the implementation in my laboratory. I wasn't and there
was no opportunity for me to do it from the airplane where I was working. I
could have relied on the programmer finding a suitable digital engineer as a
guide but I wasn't willing to take that chance either. "Two 1K or 2K
resistors in series between the input signal and ground and the port
connected to their middle junction" was adequate under the circumstances.

And, for the record, my OP didn't ask how to solve the problem -- it simply
asked if anyone knew how much damage would have beed done if the 10v were
connected directly to the parallel port. While I wasn't aware of any
"industry-wide specification" for the port, I'm not a motherboard designer
and don't know their common practices. I also wasn't going to take one of
my own computers and connect it to a 10v supply to see what happened.

Norm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top