Microcontrollers and pull-up / pull-down resistors

In case of GPIOs of microcontrollers, a pull-up resistor is a resistor connected between a signal conductor and a positive power supply voltage while a pull-down resistor is a resistor connected between a signal conductor and a ground. 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. They may also be used at the interface between two different types of logic devices, possibly operating at different logic levels and power supply voltages.

Pull-Up-Down-Schematic

Pull-up / Pull-down schematic, source: http://raspberrypi.powersbrewery.com

 

Microcontrollers usually have GPIOs armed with internal pull-up resistors. The value of this pull-up depends on the microcontroller used and can be found in datasheet. On most AVRs, the value is guaranteed to be between 20kΩ and 50kΩ. You can configure any digital input pin to use the internal pull-up by enabling a flag of dedicated register.

Internal pull-up resistor, source: www.mikroe.com

Internal pull-up resistor, source: www.mikroe.com

Some good readings on pull-up/pull-down resistors:

Leave a Comment