Tying constant pins of logic gates up or down: need a resistor or not? - Page 1
Forum section: electronics / beginners

author: TheCalligrapher
author_rank: Regular Contributor
timestamp: June 20, 2023, 06:49:04 pm
content: A very basic question, for which I don't seem to be able to google a direct answer:Sometimes we have to supply a constant value to some input of a logic gate - a constant logical 1 or a constant logical 0. E.g. I might have to connect the OE' input of 74HC595 to constant 0 to keep the output permanently enabled. Or I might have to connect the cascading I= input of 74HC85 to constant 1 per datasheet requirements.Of course, an obvious solution would be to connect such inputs directly to VCC or GND. When it comes to tying down to GND (logical 0) this clearly seems to be the right answer. But what about tying up to VCC (logical 1)? Is direct connection to VCC the right thing to do? Or is it advisable to place, say, a 10K resistor between the pin and VCC? I remember reading somewhere that adding a resistor might help to "lower noise" (at that input? overall?)To make the question more specific, let's say we are talking about 74HC logic working off 5V power supply.Thanks for any insight.

author: Benta
author_rank: Super Contributor
timestamp: June 20, 2023, 07:08:17 pm
content: Back in the RTL, DTL, TTL, ECL days, this was a valid discussion point.With today's CMOS logic, just tie the inputs directly to VDD/VCC and VSS/VEE as needed.

author: TimFox
author_rank: Super Contributor
timestamp: June 20, 2023, 07:11:15 pm
content: With original 7400-series TTL ("real" TTL), it was hazardous to connect an input directly toVcc= +5 V, due to low input voltage breakdown rating.The smoke limit forVccis < + 7 V, but for an input it is +5.5 V.However, with that series, any resistor used to "pull down" an input to 0 V had to be relatively low value < 500\$\Omega\$, due to the 1.6 mA input current in low state, where the low-input voltage < 0.8 V to ensure the low state.Later series have wider specs and lower input currents, but design rules for testability often require a suitable resistor in either case to allow full testing of devices.I.e., it is handy for testing to be able to force any input to logic 0 or 1, which is impossible without a series resistor.Low-power SMT resistors of no real precision are dirt cheap.

author: inse
author_rank: Super Contributor
timestamp: June 21, 2023, 03:53:02 am
content: Is the input voltage limit really 5.5V or is it Vcc +0.5V?

author: David Hess
author_rank: Super Contributor
timestamp: June 21, 2023, 05:12:29 am
content: On real TTL, the input transistor will operate with reverse beta with the emitter and collector reversed if the input is above about 1.4 volts, so the input current must be limited with a resistor if the input is tied to +5 volts.Later TTL replacements which use diodes or PNP transistors for inputs do not suffer from this problem and may have their inputs connected directly to +5 volt Vcc without issues.

author: gnuarm
author_rank: Super Contributor
timestamp: June 21, 2023, 05:22:09 am
content: I never connect logic inputs directly to the power rail. I connect them to the logic 1 rail. You have one of those in your system, right?No, I'm just kidding. The "don't connect to Vcc" is something from one TTL family and not others. Although, I don't recall how we terminated an unused ECL input. I know every ECL signal needed a terminator, but it was to an intermediate voltage, I think. That was some fussy logic in some ways, but you just didn't need to work so hard to run it at high frequency. I remember someone designing a system with a backplane running at 25 MHz, and they didn't really understand why that was about the limit. In reality, it was the lack of termination and the resulting reflections. Not sure why it worked at any speed really. Double clocking from clock ringing doesn't care about the clock rate, just the edge speed.

author: SeanB
author_rank: Super Contributor
timestamp: June 21, 2023, 11:43:17 am
content: The reason for the resistor is also because TTL and CMOS have a parasitic SCR structure in them, made by the input gates and output gates, and the base silicon in conjunction with the protection diodes. Hard to turn on, but can be if you put enough transient current through the inputs. Thus the advice to tie all unused inputs to an appropriate voltage, logic 1 is easy with a resistor from 100R to 10K to the Vcc rail, and logic 0 normally with a resistor between 330R and 470R to Gnd. CMOS the resistor to Vcc or Gnd can be anything from 100R to 100k, though the higher values and long traces can pick up noise, slightly changing threshold on adjacent inputs. On a board look at using any resistor you already have in that range, and thus it is a almost zero extra cost, as you probably also will need to jump a trace anyway, and the resistor can double as a jumper over the trace as well, saving needing 2 vias and an area on another plane.

author: CaptDon
author_rank: Super Contributor
timestamp: June 21, 2023, 01:49:03 pm
content: One thing I didn't like about the TTL "Tie hi with a resistor" was when they had inputs from different I.C.'s tied to the same resistor. They did this with a lot of the early arcade video games and it seemed to cause some weird transient problems. In particular I remember 74112 not liking this arrangement. Somehow my conclusion was that there were certain logic functions that seemed to 'back feed' transients to their input pins which would upset other inputs tied to the same resistor. I used to see within the same logic board things like 5AAA, 5BBB, 5CCC etc. for the nodes produced by a 1K pullup resistor with multiple inputs of multiple packages tied to the node. It was usually a disaster and in the end we usually just jumpered out the pullup resistors and all the weird un-duplicatable problems would go away.

author: SeanB
author_rank: Super Contributor
timestamp: June 21, 2023, 02:10:07 pm
content: Yes TTL inputs are going to inject noise into the drive, because of the multiple emitters there doing step changes in input current. Best is a resistor per package, or if not make it lower than 100R, so that there is little bounce developed.Otherwise yes you can get voltages developed on these resistors, either above or below the power rail. Best though is a resistor per input, or at least use a output from another gate that is always at one logic level. Or emulate a gate output, diode from Vcc, and a resistor to pull 16mA of current to the ground rail, to emulate a logic 1 like a gate, and the same, but with 20ma, with diode and resistor swapped, to emulate a low level. So a 240R resistor for high, and 220R for low, or just use those value resistors and forget the diode entirely, which means up to 20 unused inputs can be connected no problem. Otherwise simplest was to parallel inputs on the same gate, which meant the load would not differ at all.

author: TimFox
author_rank: Super Contributor
timestamp: June 21, 2023, 03:19:02 pm
content: Quote from: gnuarm on June 21, 2023, 05:22:09 amBack in the 7400 days, a small Motorola publication (with a purple cover) introducing the series recommended taking an unused inverting gate, grounding its inputs, and using the output for your "logic 1 rail" supply voltage.

author: TimFox
author_rank: Super Contributor
timestamp: June 21, 2023, 03:21:29 pm
content: Quote from: inse on June 21, 2023, 03:53:02 amThe data sheet for 7400 TTL devices says +5.5 V for theVINmaximum rating, along withVccmax = +7.5 V

author: CaptDon
author_rank: Super Contributor
timestamp: June 22, 2023, 01:44:26 am
content: I never really looked at the '7.5' volt spec and it surprises me!! I have seen TTL stuff with holes in their lids and smoke at a mere 6.5vdc VCC. I have seen TTL logic packages damaged and non-functional at 6.0vdc VCC. Maybe it blows the input transistors and they short and smoke the package? I really hated the era of 8 to 10 volts going through a series pass tranny to make 5vdc!!! Short the pass tranny (one or more 2N3055's usually and the entire logic board is D.O.A.!! I saw some idiots ruin about $10K worth of GE FANUC boards because the pass tranny was bad and there was about 13vdc on the 5 volt rail. Even the red +5 monitor LED was orange from over current!!! It was my first clue why they couldn't seem to fix the machine no matter how many boards they swapped in to it (and burned to a crispy golden brown perfection).

author: JustMeHere
author_rank: Frequent Contributor
timestamp: June 22, 2023, 02:04:16 am
content: Always check your datasheet and make sure it doesn't require pull ups/downs. I have seen that reset pins require a resistor on some chips.

author: TimFox
author_rank: Super Contributor
timestamp: June 22, 2023, 02:47:44 am
content: Quote from: CaptDon on June 22, 2023, 01:44:26 amI'm guessing that with 7400 TTL and 6.5 V applied to bothVCCand an input that the device latched up due to the input voltage.I have latched up other devices, with a high current available, and had the device package get very hot.

author: gnuarm
author_rank: Super Contributor
timestamp: June 22, 2023, 04:38:32 am
content: Quote from: CaptDon on June 22, 2023, 01:44:26 amWhy would the power supply not have over voltage protection, such as a crowbar? Seems rather negligent for a set of expensive gear.

author: CaptDon
author_rank: Super Contributor
timestamp: June 22, 2023, 12:43:04 pm
content: Gnuarm, you are very correct about the crowbar and 95% of the older stuff with linear power supplies did include crowbar circuits. I am not really sure why some industrial machines either had no crowbar or in some cases I found the crowbar disabled/disconnected. I think that the EMI from large motors and large contactors may have found their way in to the crowbar circuits from capacitive coupling to the crowbar gate and tripped the crowbar even though the +5vdc didn't spike to a real overvoltage. This was causing nuisance machine shutdowns. Remember, when a crowbar trips you have to remove power to get a reset which means cold starting the machine which may have an incomplete object now stuck in it.

author: Siwastaja
author_rank: Super Contributor
timestamp: June 22, 2023, 01:21:18 pm
content: As others have said, for CMOS parts, which is all we have today (TTL-compatible CMOS parts are still CMOS), no resistors needed. They just add cost. If you want modifiability by sometimes populating the resistor, sometimes not, then it's a good idea of course.This only applies when we are talking about the same Vcc as the part's supply voltage. If it's coming from a different source, then power sequencing (order of voltages rising and falling) can become an issue and a series resistor will limit the current flowing through the input protection diodes of the IC. Without a resistor, the input voltage that comes before Vcc tries to power up your whole circuit through the poor little protection diode which can only handle a few mA. By using, say, 1kOhm resistor, current is limited to a safe value. The rest of your circuit may still try to power up and do strange things, so beware. There are logic parts which allow voltages on input pins even when powered down, but that is advertised on the datasheet front page explicitly.

author: gnuarm
author_rank: Super Contributor
timestamp: June 22, 2023, 09:07:34 pm
content: Quote from: CaptDon on June 22, 2023, 12:43:04 pmYeah, guess I should have said a properly designed crowbar.If you are driving motors from a power supply, what else is on the circuit that needs protecting? If you have surges on the line from electromechanical equipment, you probably should not have sensitive electronics on the same power rail. The trips are not "nuisance", they are protecting the electronics.How would anything "capacitively" couple to the crowbar circuit? Isn't it directly connected to the power rail?

author: David Hess
author_rank: Super Contributor
timestamp: June 22, 2023, 09:24:20 pm
content: Quote from: gnuarm on June 22, 2023, 09:07:34 pmSteps are taken in the crowbar circuit to prevent noise from triggering it, but it can happen anyway since the trigger still needs to respond quickly.

author: gnuarm
author_rank: Super Contributor
timestamp: June 22, 2023, 09:37:21 pm
content: Quote from: David Hess on June 22, 2023, 09:24:20 pmIf you need to protect electronics, you can't have equipment on the same power rail that creates surges that trip the crowbar. Isn't that pretty basic? Use two separate power rails.

author: Infraviolet
author_rank: Super Contributor
timestamp: June 22, 2023, 10:33:52 pm
content: JustMeHere, reply #12, For reset pins I think the reason a resistor is usually stated rather than tying directly to Vcc is simply so that the pin can still be pulled down if you want to be able to send a LOW in as a reset signal. I think in most cases ifyou are sure you'd never need to reset a chip then tying the reset directly to Vcc is likely ok. The point is not to let it float, lest it risk randomly floating down below the threshold and causing an unexpected reset.

author: TimFox
author_rank: Super Contributor
timestamp: June 22, 2023, 11:05:06 pm
content: In general, logic input pins should never float--an undefined dangerous state.As I stated way above, series resistors can be useful for board testing (as in the example of reset) even if not required for smoke prevention.

author: Benta
author_rank: Super Contributor
timestamp: June 22, 2023, 11:10:31 pm
content: What's confusing about the OP's "a constant logical 1 or a constant logical 0."?No mention of special needs for Reset or bidirectional pins. I think the question has been answered.

author: TheCalligrapher
author_rank: Regular Contributor
timestamp: June 27, 2023, 05:14:52 pm
content: Yes, the question has been answered. Big thanks to everyone.Nevertheless, the ability to override the input if need arises does indeed sound as a useful reason to add a pull-up or pull-down resistor to some strategically selected "unused/constant" pins. There's no need for that in my specific situation, but this is a very elegant point anyway.