Electronic – Why would an input pin have both a pull-up and pull-down resistor

gpiopulldownpullupresistors

In his answer detailing the various types of input pins, Russell McMahon leaves the following note [referring to input pins]:

there are special cases where a resistor to high and low at once is useful

What are the special cases where both a pull-up and pull-down resistor are required? Isn't there a current waste?

Best Answer

I've done it several times when I couldn't figure out in advance which I really need. So I would put both on the PCB and only solder down one. In this way, if I was wrong I can just remove the resistor and solder the other one down.

These days, split termination isn't done so much but it used to be a popular form of signal termination. To the unfamiliar, split termination looks like both a pullup and pulldown where the resistor values are usually less than 400 ohms.

For analog inputs, sometimes an input needs a DC bias. This can be done using a simple resistive voltage divider-- which also looks like a pullup+pulldown. Normally in this case there is also something that blocks the DC, like a cap in series with the signal, before the resistors.

In my opinion, you never actually need a pullup and pulldown at the same time, since it just doesn't make electrical sense. Using both at the same time will create a conflict and the end result is not an up or down, more like a pull-sideways! :) But there are lots of things, like the 3 that I mentioned, that will appear like a pullup and pull down at the same time. These are very common, and I know of new engineers who confuse them for pullups+pulldowns.