Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Image Added


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.


A pull-down resistor works in the same way but is connected to ground. It holds the logic signal near zero volts when no other active device is connected.

References

ReferenceURL
Spark Fun - Pull Up Resistorshttps://learn.sparkfun.com/tutorials/pull-up-resistors