Difference between embedded pull-ups & hardware pull-ups

Thread Starter

mellowcandle

Joined Jun 13, 2011
1
I have a question regarding pull-up of GPIO pins.
I'm currently working with Atmel's Cortex-M3 board, which has "embedded pull-up/ pull-down" registers for all GPIO lines.
I know about resistor pull-ups / pull-downs, which is used to keep the current from flowing.
What's the difference, why do I need this kind of functionality from the micro-controller, and for which purpose ?
 

MrChips

Joined Oct 2, 2009
30,706
On-chip pullups mean that you do not need external pullups. You save on resistors. The internal pullups are moderate, about 20K to 100K. If you need more current you will have to add your own external pullups.
 

ErnieM

Joined Apr 24, 2011
8,377
Say you wanted to add a push button for a user to press. Using an internal resistor all you need do is connect the button to the port pin, and either use a pull up feature and ground the other switch end, or use a pull down feature and connect to +V the other switch end to +V.

Why you do either depends on if a button press = 0 or =1 is easier to sense (or just flip a coin). But either way you save using an external resistor as MrC sez.
 

MrChips

Joined Oct 2, 2009
30,706
Another simple example, suppose you need to connect the four outputs of an LM339 quad comparator to four input pins of your MCU. The outputs of most comparators are open-collector and they need pull-up resistors. Now the MCU provides the pull-ups internally.
 
Top