Last time, I talked about software strategies for reducing power. This time, I’d like to talk about hardware strategies. From a hardware standpoint, controlling power to peripherals, both internal to the MCU and external, can save considerable power. It is straightforward enough to disable on-chip peripherals using the MCU’s control registers. But it may not be as obvious to disable peripherals external to the MCU. Using general I/O pins, power can be controlled to external circuits.
Power discreet and IC components
Now discreet components such as LEDs and photosensors may be obvious candidates for controlling with I/O, but just about any circuit can be controlled in a similar fashion. If the component requires more current than the MCU can provide directly, buffers can be used as power switches to these circuits. In some cases, simply connecting several I/O pins in parallel can provide enough current.
Use hardware modules for monitoring input
Another hardware/software trick is to use modules with interrupts to monitor external signals versus polling the input. If you just need to observe a rising or falling edge, use an interrupt pin. If you need to know a relative time the edge occurred, use a timer input capture. Both timers and pin interrupts can operate in several low power modes.
For analog signals, a comparator combined with an ADC channel can create a very efficient monitor. The Freescale MCU’s comparator uses a fraction of the current of the ADC module. Configure the comparator to run in a low power mode and trip at a threshold voltage. When the MCU wakes, the ADC can measure the same signal for a more accurate reading. Several Freescale MCUs even have comparators and ADC channels on the same pins to make this simple.
Configure I/O pins for lowest power
The MCU’s I/O pins themselves can be a source of excess current if not configured properly. Unused pins need to be terminated to prevent a floating input from creating a high current path. This is frequently overlooked when using an MCU that comes in a variety of packages.
We tend to forget that the pins available in the highest pin count version are still on the silicon in the lower pin count versions. Any input pin left floating will become a frustrating source of excessive current, many times only under certain circumstances, such as temperature variations. In these cases, an internal pull-up should be enabled, or, if the pin is an I/O, it can be configured as an output (data is irrelevant if it is driving an open circuit).


