Electronic – Pull-up vs Pull-down for contact switch

microcontrollerpulldownpullupswitches

I am designing a simple contact switch(tactile, which conducts when you pushes, and springs back to not-conducting when released) interface with a microcontroller.

It's GPIO has option for both internal pull-up and pull-down.

1) Which one should I use? For 2 layered board, pull-up makes me easier to do PCB artwork, since one-end of switch connects to GND.
Other than that, is there any difference or reason for me to use one configuration over another?

2) Is there any possiblity that the noise from physical contact make MCU malfunction?

Best Answer

1) Which one should I use?

Whatever suits your overall design best

1) For 2 layered board, pull-up makes me easier to do PCB artwork, since one-end of switch connects to GND.

That is exactly the reason pull-ups are used more often than pull-downs (and some chips only have pull-ups): a ground line is often more conveniently available for the other side of the switch (and open-colledror/drain outputs are more common than their top-side counterparts).

1) Other than that, is there any difference or reason for me to use one configuration over another?

2) Is there any possiblity that the noise from physical contact make MCU malfunction?

I would guess that (in a reasonably well designed system) the power is more noisy that the ground, so an active-high switch would potenetially induce more noise. But even that should be no problem on a digital input with sufficient margin.

So by all means, go for pull-up and an active-low switch.