Datasheet

1/20/2018 Pull-up Resistors - learn.sparkfun.com
https://learn.sparkfun.com/tutorials/pull-up-resistors?_ga=2.252286785.915074398.1516331036-531257354.1515063447 1/3
Pull-up Resistors
SHOP LEARN BLOG SUPPORT
CONTRIBUTORS: A1RONZO
FAVORITE 34
Introduction
Pull-up resistors are very common when using microcontrollers (MCUs) or any digital logic device. This tutorial will explain when and where to use pull-up resistors, then we
will do a simple calculation to show why pull-ups are important.
Suggested Reading
Concepts that you should be familiar with before proceeding:
What is a circuit?
Resistors
Voltage, Current, Resistance
Digital Logic
Input/Output
What is a Pull-up Resistor
Let’s say you have an MCU with one pin configured as an input. If there is nothing connected to the pin and your program reads the state of the pin, will it be high (pulled to
VCC) or low (pulled to ground)? It is difficult to tell. This phenomena is referred to as floating. To prevent this unknown state, a pull-up or pull-down resistor will ensure that the
pin is in either a high or low state, while also using a low amount of current.
For simplicity, we will focus on pull-ups since they are more common than pull-downs. They operate using the same concepts, except the pull-up resistor is connected to the
high voltage (this is usually 3.3V or 5V and is often refereed to as VCC) and the pull-down resistor is connected to ground.
Pull-ups are often used with buttons and switches.
With a pull-up resistor, the input pin will read a high state when the button is not pressed. In other words, a small amount of current is flowing between VCC and the input pin
(not to ground), thus the input pin reads close to VCC. When the button is pressed, it connects the input pin directly to ground. The current flows through the resistor to
ground, thus the input pin reads a low state. Keep in mind, if the resistor wasn’t there, your button would connect VCC to ground, which is very bad and is also known as a
short.
So what value resistor should you choose?
The short and easy answer is that you want a resistor value on the order of 10kΩ for the pull-up.
A low resistor value is called a strong pull-up (more current flows), a high resistor value is called a weak pull-up (less current flows).

Summary of content (3 pages)