Author Topic: Pull-up resistors - technically necessary vs preference?  (Read 10903 times)

0 Members and 1 Guest are viewing this topic.

Offline TomS_Topic starter

  • Frequent Contributor
  • **
  • Posts: 861
  • Country: gb
Pull-up resistors - technically necessary vs preference?
« on: July 25, 2018, 04:25:34 pm »
Hi all.

When I design my digital circuits these days, I have some "habbit" in terms of how I connect pins to the supply rails.

If something needs grounding, like the inputs of unused gates, I'll hook them straight to ground. If something needs to be pulled up, I hook it through a high value resistor (typically 100K, lower if there are rise time considerations) to the positive rail.

Now, there are circumstances where pulling up via a resistor is functionally necessary, e.g. active low signals where some kind of open collector/drain gate pulls them down, think CPU/uC reset et al.

But otherwise, is there any technical necessity to pulling something up via a resistor if it doesnt need to be pulled down? e.g. the preset of a D type flip flop (74HC74 for example) might be pulled up such that when it is reset the Q output is low by default? Unless theres a specific reason where that behaviour might need to be modified, is there any kind of necessity to use a resistor to pull it up? Usually I'll do away with pull ups when Im breadboarding, but include them in my final designs.

And a specific application I have right now which is making me question this is using a 74HC688 comparator to match a value on a Z80 address bus with a value entered via some DIP switches. Currently, and to satisfy my current habbit, I have the pins pulled up via resistors, and the DIP switch positions pull a pin to ground, but this means you have to enter a complementary value (switch off = pin high and vice versa). And now Im thinking .. why not pull them low via a resistor and use the DIP switch to pull the pins up to the positive rail...

I dont really even know how or why I have this habbit, and maybe there are 5 different oppinions if you ask 5 different people...

But on that note, I would be interested to hear others reasoning for pulling up via a resistor or not.  :-//
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2500
  • Country: mx
Re: Pull-up resistors - technically necessary vs preference?
« Reply #1 on: July 25, 2018, 04:31:05 pm »
If the port is always an input, like the reset pin on a flip flop, if your circuit does not use the function you may tie it directly to the required logic level.

However on microcontrollers where ports are bi-directional, it is wise to pull up or down via a resistor, in the case the software inadvertently sets that port as an output.
 
The following users thanked this post: TomS_

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22430
  • Country: gb
  • 0999
Re: Pull-up resistors - technically necessary vs preference?
« Reply #2 on: July 25, 2018, 04:34:09 pm »
In the old days of TTL inputs could indeed be left floating, as they would always default to high, although this was considered to be bad practise. Now CMOS inputs should always be either pulled up or down.

For CMOS devices, using a resistor makes no difference. The only possible downside, other than the extra cost/space, is it makes the input more susceptible to noise, especially if the resistor value is high. The only reason why one would use a resistor, rather than tying directly to +V or 0V is it makes it easier to use the input, at a later stage. Other than that, there's no reason to use a resistor and not using one to pull-down, but using one to pull-up, is just inconsistent.
« Last Edit: July 26, 2018, 08:20:26 am by Hero999 »
 
The following users thanked this post: TomS_

Offline TomS_Topic starter

  • Frequent Contributor
  • **
  • Posts: 861
  • Country: gb
Re: Pull-up resistors - technically necessary vs preference?
« Reply #3 on: July 25, 2018, 04:47:51 pm »
However on microcontrollers where ports are bi-directional, it is wise to pull up or down via a resistor, in the case the software inadvertently sets that port as an output.

On that note, I have always seen it recommended to set all unused pins as outputs so that you wouldnt have to worry about potentially floating inputs, and would then be able to avoid the need for additional components to pull them either way. I suppose, assuming you can actually configure the pins as outputs in the first place. But I guess thats an application specific thing to worry about.
 

Offline georges80

  • Frequent Contributor
  • **
  • Posts: 932
  • Country: us
Re: Pull-up resistors - technically necessary vs preference?
« Reply #4 on: July 25, 2018, 05:02:45 pm »
On the uC's I use I do indeed set unused pins to output or to input and activate the internal pullup resistor (or pulldown depending on the uC capability). This reduces standby current significantly versus having floating inputs.

cheers,
george.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 5784
  • Country: dk
Re: Pull-up resistors - technically necessary vs preference?
« Reply #5 on: July 25, 2018, 06:06:17 pm »
However on microcontrollers where ports are bi-directional, it is wise to pull up or down via a resistor, in the case the software inadvertently sets that port as an output.

On that note, I have always seen it recommended to set all unused pins as outputs so that you wouldnt have to worry about potentially floating inputs, and would then be able to avoid the need for additional components to pull them either way. I suppose, assuming you can actually configure the pins as outputs in the first place. But I guess thats an application specific thing to worry about.

I seem to remember an app note for an FPGA talking about setting unused pins to output low and tying them to
ground helps with signal integrity, iow basically use them as extra ground pins

 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1052
  • Country: ca
Re: Pull-up resistors - technically necessary vs preference?
« Reply #6 on: July 25, 2018, 10:26:59 pm »
Back in the 70's, my first professional position required that designs have at least one signal per board (VH) to provide a current limited logic high signal to all devices, something like a 1K0 resistor to Vcc.  The theory was that Vcc was essential not current limited, but if something went wrong with the device and a input shorted to ground, it wouldn't cause extra damage.   Back then semiconductor devices had a significantly higher infant failure rate than now.  I'll bet  that a good bit was due to manufacturers pulling up their socks and making better parts. Assembly staff and engineers/technicians became aware of grounding soldering irons and using antistatic straps.  It is possible to damage TTL devices with static electricity, even if the data sheet doesn't say so.  While debugging a output port to a peripheral, I found that the schottky clamp diode on one of the output devices in some LS and ALS parts could be zapped quite easily.

Sometimes a pullup resistor was provided for certain inputs for debug and test as it allowed for setting certain states or conditions.

Bipolar TTL will have a maximum value for a pull-down resistor that will guarantee a VIL into the device given the input current of the device.  If memory serves, the current sourced by the input was a mA or so and if the pull-down resistor was too high, the device could see the logic level as indeterminate.  During design reviews, we'd have to defend the use of pull-downs and show there was no other way.

Cheers,
 
The following users thanked this post: TomS_

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4108
  • Country: us
Re: Pull-up resistors - technically necessary vs preference?
« Reply #7 on: July 25, 2018, 11:45:58 pm »
Quote
But on that note, I would be interested to hear others reasoning for pulling up via a resistor or not.  :-//

I have seen pullup and capacitor on professional circuitry just to set an address pin. I assume it is to filter out noise, but the rail is completely stable. OTOH, maybe it was just a convenient place to sprinkle a decoupling cap... :-//

I try to use the fewest parts possible. If it don't work like that, then I add more stuff, later. But it depends what it's for. If it's something critical, built in redundancy can be a good thing. And if you have lost time over something in the past, you are more likely to continue "fixing" related things in the future, even if it was an isolated incident due to specific reason. Like OP, many EE probably add things just because that's what they have done before. This isn't nececssarily a bad thing; probably good thing in PSU design or other things which can hurt people. My code is full of vestigial things that don't need to be there, but it might be risky to change.

I will omit the pullup if it's not being used as an input pin. I will also omit a series resistor on a FET gate when ringing doesn't matter. I like to leave things out. Even writing up a BOM is annoying.
« Last Edit: July 26, 2018, 12:02:44 am by KL27x »
 
The following users thanked this post: TomS_

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 19214
  • Country: us
  • DavidH
Re: Pull-up resistors - technically necessary vs preference?
« Reply #8 on: July 26, 2018, 12:04:50 am »
In the old days of TTL inputs could indeed be left floating, as they would always default to high, although this was considered to be bad practise.

...

Using a resistor makes no difference. The only possible downside, other than the extra cost/space, is it makes the input more susceptible to noise, especially if the resistor value is high. The only reason why one would use a resistor, rather than tying directly to +V or 0V is it makes it easier to use the input, at a later stage. Other than that, there's no reason to use a resistor and not using one to pull-down, but using one to pull-up, is just inconsistent.

Back in the 70's, my first professional position required that designs have at least one signal per board (VH) to provide a current limited logic high signal to all devices, something like a 1K0 resistor to Vcc.  The theory was that Vcc was essential not current limited, but if something went wrong with the device and a input shorted to ground, it wouldn't cause extra damage.

The rule about using a pull-up resistor to tie an input high comes from the early TTL days for a specific reason.

Take a close look at the multiple emitter input structure of the standard TTL NAND gate shown below.  If any input is tied to Vcc, the input transistor can operate in reverse creating a short through the two Vbe junctions of the following stages.  The reverse current gain is low but usually enough to damage the IC.

Later TTL logic families including low power schottky (but not standard schottky!) which largely replaced standard TTL used schottky diodes or PNP followers in place of the multiple emitter input structure so can have their inputs safely tied to Vcc.
 
The following users thanked this post: TomS_

Offline TomS_Topic starter

  • Frequent Contributor
  • **
  • Posts: 861
  • Country: gb
Re: Pull-up resistors - technically necessary vs preference?
« Reply #9 on: July 26, 2018, 07:58:40 am »
Ok, so the general consensus seems to be that pull ups just for the sake of setting a pin high are a carry over from a by gone era?

Use them as necessary, e.g. open collector/drain signals, or where you might want to fiddle with a signal later, but if neither of those are necessary then they can be left out.

I only tend to work with CMOS devices these days, like 74HC, so I guess I'm not worrying about TTL specifics.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 22430
  • Country: gb
  • 0999
Re: Pull-up resistors - technically necessary vs preference?
« Reply #10 on: July 26, 2018, 08:17:22 am »
The rule about using a pull-up resistor to tie an input high comes from the early TTL days for a specific reason.

Take a close look at the multiple emitter input structure of the standard TTL NAND gate shown below.  If any input is tied to Vcc, the input transistor can operate in reverse creating a short through the two Vbe junctions of the following stages.  The reverse current gain is low but usually enough to damage the IC.

Later TTL logic families including low power schottky (but not standard schottky!) which largely replaced standard TTL used schottky diodes or PNP followers in place of the multiple emitter input structure so can have their inputs safely tied to Vcc.
Thanks, I didn't know about the parasitic transistor working in reverse on TTL families.

Just to be clear though, the second paragraph of my previous reply pertained to CMOS, not TTL and has been edited to reflect this.
Ok, so the general consensus seems to be that pull ups just for the sake of setting a pin high are a carry over from a by gone era?

Use them as necessary, e.g. open collector/drain signals, or where you might want to fiddle with a signal later, but if neither of those are necessary then they can be left out.

I only tend to work with CMOS devices these days, like 74HC, so I guess I'm not worrying about TTL specifics.
Yes, there's no need to use them on modern CMOS devices.

I agree with the comment regarding micro controllers, but that can be mitigated by enabling internal pull-ups (some devices have built-in pull-up resistors/current sources, which can be used if needs be) or defaulting unused pins to low outputs.
« Last Edit: July 26, 2018, 08:19:50 am by Hero999 »
 
The following users thanked this post: TomS_

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 19214
  • Country: us
  • DavidH
Re: Pull-up resistors - technically necessary vs preference?
« Reply #11 on: July 26, 2018, 07:02:46 pm »
Thanks, I didn't know about the parasitic transistor working in reverse on TTL families.

It is not a parasitic transistor so much as that bipolar transistors have reverse current gain. 

They used to make "chopper" or "audio muting" bipolar transistors with equal forward and reverse hfe and equal Vcb and Veb breakdown voltages for special applications.  The 324/358 and 741 operational amplifiers take advantage of this for a high differential input voltage range; their PNPs have a high Veb breakdown.

Sometimes this can be taken advantage of in modern circuits; bipolar transistors operating in reverse have a much lower Vce saturation.
 

Offline CopperCone

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • *knock knock*
Re: Pull-up resistors - technically necessary vs preference?
« Reply #12 on: July 26, 2018, 07:12:07 pm »
you need to analyze the circuit like anything else. if its totem pole, push pull, other. A external pull up resistor will also be much more robust then anything internal in terms of power dissipation.

something to consider is the rail noise you might introduce with a pull up or the parallel resulting impedance.

I recommend if you are actually designing something seriously to draw out the circuit that its connected to, then instead of a black box draw out the actual output stage topology that is being used and try to fill in details from there to see exactly what the pull up or down resistor does to your circuit and failure modes. This way you wont fuck something up by using a rule of thumb. Analyze everything if you can. Then do steady state and transient analysis, for digital I/O you would have logic switch, logic high, logic low and possibly data stream/fast switching
« Last Edit: July 26, 2018, 07:16:21 pm by CopperCone »
 

Offline duak

  • Super Contributor
  • ***
  • Posts: 1052
  • Country: ca
Re: Pull-up resistors - technically necessary vs preference?
« Reply #13 on: July 26, 2018, 07:57:57 pm »
David, that's a really good point about the reverse hfe of input transistor of a TTL gate and Vih(max).  I had sort of known about using a bipolar transistor in reversed mode to give a lower Vce(sat) but never understood its use in a particular circuit til last year, almost 50 years later.  I believe the reverse hfe for a discrete transistor is less than unity so if the TTL input transistor is similar, the collector current should be quite small as the base current is limited by a series resistor.  However, I don't know for sure.

It'd be interesting to see if there were very many designs or products that actually provided a correct pullup voltage.  I sort of recall once seeing an unused gate providing a VH for various other devices.

It's neither here nor there but Intel's 8086/88 seemed to have had a layout fault where one of the address lines actually went above Vcc.  I remember one of my colleagues pointing this out to the Intel office in Bellevue, WA in '82-'83.  The FAE confirmed the observation but I don't believe Intel did anything about it.  Here's a joke: "What's corporate-speak for F-U?" answer: "Thank you for your input"

Cheers,

 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 19214
  • Country: us
  • DavidH
Re: Pull-up resistors - technically necessary vs preference?
« Reply #14 on: July 26, 2018, 08:50:05 pm »
It'd be interesting to see if there were very many designs or products that actually provided a correct pullup voltage.  I sort of recall once seeing an unused gate providing a VH for various other devices.

I have seen lots of old designs which either used a pullup resistor or a separate gate to generate the logic high level; good designers followed the rule even if they did not know why it existed.  And I have also seen designs which failed because a TTL input was tied to Vcc.  The recommendation was to continue to use pullups or a gate after LS TTL became ubiquitous because someone could always substitute a standard TTL IC and I have seen that happen also.

There is a similar rule for unused operational amplifiers in dual and quad packages where they are suppose to be configured as followers with the output tied to the inverting input and the non-inverting input is tied to a voltage within the operational amplifier's common mode range.  This prevents a single amplifier from saturating which could increase quiescent current and affect the other units in the package through shared bias circuits.

 
The following users thanked this post: kg4arn


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->