So I know the Atmega328p (What im using now) has Pull-up resistors available to be activated. And I know when reading input we could either make a button cause a PIN to go high or low....but is there an advantage to either?

Obviously making the button go to GND when pressed is easiest since there are Internal Pullup's available...but is there possibly an advantage to making an external pulldown and then making the logic level go high when pressed?

I seem to see the first (easier way) used more, but I was curious if there was an advantage to either one.

  • 3
    \$\begingroup\$ One thing to consider is that a pull-down likely means you are running power to a button rather than ground. Typically ground is more likely to be found around the periphery of a board, which makes for easier routing. And having power on button contacts could contribute to an accidental supply short while testing on the bench. \$\endgroup\$ Nov 6 '18 at 16:17

Datasheet shows that

  • the noise margin is a little wider for the High logic input state.
  • input current is microamperes, no serious difference between Hi and Lo states.

Obviously the same noise field cause more voltage to wire+pull-up resistor than to wire + to GND conducting switch. Conclusion: Use pull-up resistors.

This is true of course when only external resistors are compared. If you compare internal pull-up vs external pull-down, of course the external pull- down resistor reduces noise, because it must be quite small to win the internal pull-up. This can make someone to think that the question was originally a trick.

NOTE: In severe conditions, for ex. near radio transmitters (including wlan and phones) the difference is nonexistent, serious design effort is needed to filter the noises out of the signals.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.