- pull-up/pull-down/short-protection resistor design
- Posted by Johnson Liuis on March 1st, 2005
Please do not laugh at these newbie questions.
I am looking into some sample circuit design and wants to learn how to use
resistors for the following purposes:
1) pull-up/pull-down resistor for unused pins. It seems that 10K was used
for some cases while 4.7K or 150K was used for other cases. Any big
difference when use different resistors for this purpose? Which one can
better sustain the noise?
2) short-protection/current-limiter for pins that support both Input and
Output. For the data bus, the pins were grounded with 150K resistor (for
example, D0 to D0 first, then to ground with a resistor); for some control
pins, 22R resistors were used to connect them (for example, RXRDY to RXRDY
with a resistor). So what is the benefit to connect the data bus to ground
with a big resistor, to speed the transaction time or sustain noise? What
is the benefit to connect the pins with a resistor without grounding them?
Thanks in advance.
Johnson
- Posted by Peter on March 1st, 2005
"Johnson Liuis" <gpsabove@yahoo.com> wrote in message
news:38k6hgF5oqj52U1@individual.net...
For unused pins it doesn't make much difference what you use to pull up or
down. Lower values will be better against noise but you are unlikely to get
any problems on a static input.
If the pins are used and have pullups then you need to balance the speed
against power consumption. Too low will take too much drive current. Too
high and the pullups will take a while to put the voltage up again.
Your design might have pulldown resistors if it is being driven using a
tristated bus, to ensure that it reads 0 if nothing is driving the bus. They
will slow down the bus.
If you have a long bus then you must make sure that the impedance matches or
you will get reflections. The correct terminating resistors will ensure
this. That might be what your 22R resistors doing. Short circuit protection
is a more likely reason, as you already thought.
Peter
- Posted by Joerg on March 1st, 2005
Hello Johnson,
No, I won't. Every one of us has started from scratch at some point.
Unless you have long lines it doesn't make a lot of difference.
Sometimes a higher value is desirable, for example when a push button
may be held a long time and power consumption must be minimal. If you
have a long line connected and expect a lot of static a smaller value
might be advised.
Usually this is done when a data bus or part of it could go into
"tri-state" (where all drivers are turned off from the bus) or where a
line could be floating for other reasons. Floating lines must be avoided
in digital design. If a line would, say, float to half the supply
voltage all kinds of grief can happen. Such as erratic logic behavior
and overheating of chips.
Also, long data busses need to be terminated. Really long ones at both
ends. The classic kind is "Thevenin" where 220/330 resistor combos hang
between VCC and ground. I don't use that a lot because it wastes power.
There are many other methods such as AC termination but this gets to be
a bit tricky.
If you mean a resistor in series with the line: This can have two
reasons but often it is not to protect anything. One reason is to
provide a little bit of a low pass into the line, maybe to reduce
electro-magnetic interference (EMI). But usually that also requires a
capacitor on the other side.
The second reason might be "source termination", where it is assumed
that proper transmission line termination isn't going to happen at the
far end for whatever reason. This way there is at least a resistor at
the source that can dissipate reflected energy. But you would see
resistors more in the range of 50-150 ohms, not 22 ohms. They would have
to match the characteristic impedance of the connected line.
For short circuit protection you'd either need some active circuitry or
a resistor that is large enough so the device can drive into VCC or
ground through that resistor without overheating. The "absolute maximum
ratings" should tell how many mA that can be and whether that is for
just one pin or for all of them. 22 ohms is kind of small for logic
devices, unless it is a heavy duty bus driver.
Regards, Joerg
http://www.analogconsultants.com
- Posted by Johnson Liuis on March 1st, 2005
Thank you very much, Joerg,
You mentioned "source termination", andthe energy could possibly be
reflected in case that proper transmission line termination isn't going to
happen at the far end for whatever reason. I remembered when we talked about
RF circuits and cable, the signal reflection had to be considered. Should we
consider the reflection in a digital circuit as well?
BTW, is the energy reflection caused by "resistor mismatch" at another end?
Johnson
"Joerg" <notthisjoergsch@removethispacbell.net> wrote in message
news:1d6Vd.10486$Pz7.1796@newssvr13.news.prodigy.c om...
- Posted by Johnson Liuis on March 1st, 2005
Thank you very much, Peter,
It sounds that your opinion was a little bit different than Mike's. Mike
mentioned the "source termination", and the proper resistor to sustain
reflection should be within 50-150 ohms. Considering the chipset in my
design is CMOS-compatible instead of TTL, and is powered by 3.3 Volts, do
you think 22 Ohm can be appropriate for this purpose?
John
"Peter" <moocowmoo@newprovidence.demon.co.uk> wrote in message
news:d02q9b$mj9$1$8302bc10@news.demon.co.uk...
- Posted by Joerg on March 2nd, 2005
Hello Johnson,
Yes, it has to be considered. It depends on how long a line or trace is
versus how fast the signal transitions are. For ye olde TTL you could
sometimes get away with half a foot on non-terminated path but it wasn't
a good practice. When you have several feet of cable you really need to
terminate even with slow driver chips.
Source termination isn't a good option in digital circuitry because you
are losing half the amplitude onto the cable or trace. But it is heavily
used in video cabling because there it has to be assumed that some users
don't know much about the topic of "termination". So usually the signal
is amplified by a factor of two which is 6dB and then sent across a 75
ohm resistor onto the cable. If the far end isn't terminated the
reflections travel back to the source but there this 75 ohm resistor
dissipates them. This scenario assumes a zero ohms output impedance of
the driver. Since that is not quite realistic you might occasionally see
a smaller resistor, maybe 68 ohms or so.
Yes, it is caused by a mismatch at the far end. When the source is not
matched but, say, just the output pin of a 74HC240 then the reflections
would run back and forth. That is because there is nothing that could
dissipate the reflection at the source. You'd see a rather horrible
waveform on the scope if the cable was to be several feet long.
Such reflection, when left untamed, can cause data errors.
If you have to deal with this topic a lot it pays to keep a book about
it on the shelf. A good one about the pitfalls in fast digital circuits
is: Johnson, Graham: "High Speed Digital Design, A Handbook of Black
Magic". Some older ECL data books also contain transmission line
tutorials. I used the Motorola MECL book so heavily that it literally
fell apart but I still have the old Fairchild ECL book. That saves me
from having to go back to Maxwell's equations when calculating the
impedance of traces ;-)
Regards, Joerg.
http://www.analogconsultants.com
- Posted by Joerg on March 2nd, 2005
Hello Johnson,
Be careful with source termination in a digital design. You'll lose 1/2
the amplitude. It is generally better to terminate at the end of the
line. Except on comm channels where the receivers are designed to
operate on low signal amplitudes (such as RS232, Ethernet etc.).
Regards, Joerg
http://www.analogconsultants.com
- Posted by CBFalconer on March 2nd, 2005
Johnson Liuis wrote:
First, consider unused input pins. They normally control some sort
of CMOS gate, which has one FET connected to Vcc, and another to
ground. At normal logic levels of the input, at least one gate is
turned off. However, at some input level both will be turned on,
and basically create a short from Vcc to ground. This doesn't do
the circuit, or the power dissipation, any good. So some sort of
pullup or pulldown resistor is indicated to peg that input level.
10 to 100 Kohm is usually a good choice. It won't draw any power,
and will protect the input gate against power line spikes. If you
decide to use the input later you can usually ignore the presence
of that pullup.
Output circuits can be of three flavors. One is totem pole, where
the output pin is pulled hard to either Vcc or ground. These will
have good logic levels, barring fighting (of which more later).
Or they can be arranged to pull only high or low. Assume low (the
more common case). In that case something external has to supply
the high level, and that is usually a resistor to Vcc. This allows
multiple outputs of the same type to be directly wired together,
and the level is low if any output is low. Also known as the wired
and. Again, resistors in the 1 K to 10 Kohm range are often used.
The critical thing is the output risetime, governed by the RC time
constant, which in turn is the product of the resistance and all
the stray capacity on that line (which includes wiring, output
pins, and input pins).
Now consider pins that can be configured as either input or output,
or can be tri-stated to effectively remove them from the circuit,
and are connected to other pins of the same ilk (on the same or
different chips). Mistakes happen. Such a pin may be configured
for output when it should be an input, and while something else is
driving the signal line. This is fighting. The fight is usually
resolved when something burns up. This can be protected against
with series resistors. If each node connects to the common bus
through, say, 470 ohms there will always be at least about 1 Kohm
between any pair of misconfigured pins. If the logic levels are 0
and 5 Volts, then no more than 5 mAmps will flow, and the
dissipation will be in the resistors. The circuit won't work, but
it won't self-destruct.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
- Posted by Paul Keinanen on March 2nd, 2005
On Tue, 1 Mar 2005 14:52:47 -0700, "Johnson Liuis"
<gpsabove@yahoo.com> wrote:
I am quite puzzled when you would need a pull-down resistor for an
unused input and not connect it directly to ground. Using this as a
test pin in order to be able to bring it to '1' with a test wire might
be one example.
At least with many bipolar families, the input pin is connected to a
NPN transistor emitter (or possibly to a base of PNP transistor), thus
some current must flow from the input to ground to get the "0" input.
If you have a pull-down resistor R from input to ground the voltage
drop caused by the input current IiL in the resistor must be smaller
than the maximum allowed voltage to be interpreted as "0" (ViL).
Thus Iil x R < ViL.
The "1" input current IiH is nearly zero, since the input transistor
is cut-off, thus, much higher resistances can be used for pull-up
resistors with bipolar families.
Paul
- Posted by Johnson Liuis on March 2nd, 2005
Thanks, Keith,
I am using Outlook Express Newsreader. So every time I just right-click the
title, and select "Reply to Group". Is that OK?
Johnson
"CBFalconer" <cbfalconer@yahoo.com> wrote in message
news:4224FA2D.49047705@yahoo.com...
- Posted by CBFalconer on March 3rd, 2005
*** top-posting fixed ***
Johnson Liuis wrote:
So far so good, but you should move to the end of the quotations to
add your reply, snipping out anything that is not germane. Or you
can intersperse your reply with the quoted material, again removing
what doesn't apply. Your best bet is to get a better newsreader,
such as Mozilla or Thunderbird. Outhouse Excess is one of the
worst.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
- Posted by Joerg on March 3rd, 2005
Hello Paul,
With CMOS logic there would be no currents in either direction. I always
wondered: Except for really fast ECL stuff, does anyone still design
with bipolar logic these days? I mean for production, not hobby where
you'd just take what is in the parts box.
Regards, Joerg
http://www.analogconsultants.com