Pull-up and Pull-down Resistor Usage on Input or Output MCU Pins

Pull-up and Pull-downs are normally used to ensure a line has a defined state while not actively driven. They are used on inputs to prevent floating lines, rapidly switching between high and low and a middle "undefined" region. Outputs normally do not need them.

But most mcu pins are GPIO, and sometimes on startup are defined as inputs instead of outputs. As you said, sometimes you don't want an IC pin input floating on startup, especially like a reset pin that you would normally drive with your microcontroller's GPIO.

This is when you use a Weak Pull-up or Pull-down on the line. Because they are weak, and you choose the default state, they provide no interference with your circuit (If the input is supposed to be low at all times, then pulled high, you choose a weak pull-down, and vis versa), but they do consume a bit of current. This is why you choose a resistor weak (Higher the value, the weaker) enough for the job.

Another normal output setup that uses pull-ups (or pull-downs, rarer) is Open Drain or Open Collector connections. These only drive a connection low, or release the line, leaving it floating. The pull-ups are used to bring the line to a high logic state.


You have it about right; normally you don't need pullups on outputs, but they can be useful to maintain safety during boot time etc.

One other reason for using a pull-up on an output : if several outputs from several MPUs are connected to each other, you really don't want one driving VCC and another driving 0V on the same wire! So you either drive 0V on the output or turn the output off (perhaps by configuring it as an input). When all the outputs are off, the wire is pulled to '1' (Vcc) by the pullup. This is called a "wired AND" signal. (You can do the same driving '1' or off, with a pulldown R, then it is called a wired OR).

This pattern has several uses including allowing any one MPU to signal an error or turn an LED on, or allowing them all to take turns sending messages to each other on a single wire.


As you stated, using pullup/pulldown resistors on pins expected to be output pins can be there to guarantee an input state.

This is done to mitigate firmware/MCU failure, but will only work to protect against Hi-impedance state (basically the pin is configured as input by accident).

Most MCU's I am familiar with default IO pins to high-impedance input state on boot (but no guarantee, and I do not have experience with anywhere near all MCU families), which means it can take some time before the code to initialize the pin state is executed.

Sometimes this doesn't matter, other times it does.