Arduino Tip : Built-in Pull-Up Resistors

Pullup Banner
I’ve just found out a pretty awesome feature on the Arduino, or rather on all ATmega 328Ps.

Below is a simple circuit that uses an ordinary push button to light up an LED. Normally I’ll need a pull-up resistor as shown in the red box, but with the built-in pull up resistors, I can totally remove that part and save myself a resistor and some hassle when routing PCBs.

As an example, I’ll be using the sample sketch found in the Arduino IDE. It’s located under Examples -> 02. Digital -> Button.

The only difference was I added a line that enables the built-in pull up resistors.

digitalWrite(buttonPin, HIGH);

See the video below to see it in action :

The only downside is, it doesn’t have built-in pull down resistors.

This shouldn’t be too much of a problem because the normal practice in electronics will be to use pull-ups and detect LOW signals.

Print Friendly
  1. banner stands08-06-2013

    However, it is undoubtedly very important to create a banner that actually signifies your motive and
    campaign in proper manner. With the help of integrated mini PC
    you can customize your visual content. With its unique size,
    it helps you to grab attention of different people at
    the conferences.

  2. vick01-18-2013

    I think I can say like I HIGH the pin2 which is the buttonPin..Same concept.Hahaha.. Liike at the initial state, the PIN 2 is high by the CODE and not HIGH by the external pull up resistor to 5V.

    How if you define the pin as LOW ? then when press button supply a HIGH to that pin ?

    Just my thought.


  3. vick11-19-2012

    Keep RESET means the program won’t run?

  4. vick11-18-2012

    What is the purpose actually to pull up the RESET pins ? But I forgot I read somewhere they say no need..LOL

    • Wai Hung11-18-2012

      In electronics, the standard practice is to pull high and detect low.
      The reset pin detects a low to reset the mcu.

      If you don’t pull it high it will keep resetting.

  5. vick11-18-2012

    Means I no need to put any pull up resistor when use button for arduino ?

    • waihung11-18-2012

      Yup, for buttons you don’t need any pull-up resistor anymore.

  6. vick11-18-2012

    Does this means I do not need to put a pull up resistor at RESET pin (pin 1) ?

Leave a Reply