When setting an I/O pin to input on a microcontroller this allows the
controller to "see" changes in voltage on the pin. A high voltage (5 volts)
is considered on, or having a value of 1. A low voltage (0 volts) is
considered off, or having a value of 0. Your circuit will have to change
the pin value from one value to another to be useful. This is where the
pull up resistor comes in, the pull up allows the pin to default to a
particular value. For example if you wanted to connect a switch to your
circuit you could connect a 10K resistor to the input pin and directly to 5
volts, you could also connect the switch to the same pin and directly to
ground (0 volts). This configuration would allow the pin to be normally
"pulled up" to 5 volts and grounded when the button is pressed. Without the
pull up resistor the input value could float and be either 1 or 0.
Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here.
All logos and trade names are the property of their respective owners.