Content originally posted in LPCWare by elef on Fri Jan 06 05:12:01 MST 2012
Quote: Rob65
The pull up/down configurations are only valid when using the pin as input pin.
As promised, i am posting my findings regarding the pull up and pull down resistors (tested on LPC1114)
ROB65, sorry but i have to disagree. From my testing, the pull up and pull down are valid (can be turned on or off) regardless if pin is input/output (obviously in output mode they are using current internally, so you would never see any difference on the output of the pin)
When i set a GPIO to output, it does not automatically turn off the pullup/pulldown. This means you must do it manually or it will consume (read: WASTE) power/current. This is fine, because it is as i expected, i just wanted to confirm it!
The only test i haven't done is to check if they are still active when in pin function mode (like uart TX/RX, SPI etc) but i assume they would be. The data sheet only mentions they are disabled in A-D mode (but i haven't tested that either).
So the good news is now i know i need to turn them off, the bad news is, if i forget, i waste power, which is not a big deal for me, but thought i would let you all know incase you are making battery powered devices.
FYI: i measured about 60uA increase in Idd per pin i set to output, so if you have 20 pins set to output (and driven low with pullup, or driven high with pulldown), you waste about 1.2mA