A microcontroller (MCU) is a small computer formed on an integrated circuit. MCUs vary in size and complexity. However, nearly all MCUs contain a central processing unit (CPU), a read only program memory (e.g., flash memory) that stores an embedded program, a random access memory (RAM), one or more general purpose timers, and one or more general purpose input/output (GPIO) ports.
MCUs are employed in many types of products for many different markets—consumer, medical, industrial, security, and others. Many of these products are battery powered. Thus power consumption is a key specification to which embedded program developers must pay close attention. Even if the system is line operated, power consumption can be a concern since many products are contained in sealed enclosures, and the heat produced during operation must be kept to a minimum to prevent such products from overheating. Energy efficient operation of MCUs also makes it possible to eliminate fans or other schemes designed to remove heat.
There are several factors that affect power consumption in MCUs. Clock speed and clock gating are two. MCUs generate clocks that drive the CPU and other components such as timers. Internal devices (e.g., phase-lock loops) that generate clock signals, and the components driven by the clocks, consume more power with higher clock speeds. Also MCUs typically employ a clock distribution tree that distributes clock signals throughout the MCU to components that need them. The power used to drive the tree can be a substantial portion of the total power used by MCU. The whole tree structure with gates at the ends and amplifiers in between have to be loaded and unloaded every clock cycle. To save energy, clock gating temporarily shuts off parts of the tree to those components that don't need clock signals. Voltage regulation is yet another important power factor. Reducing the operating voltage of the MCU has long been a traditional approach to power consumption reduction. As the voltage goes down, so does the operating power Importantly, developers must pay close attention to power consumption when developing embedded programs.