Design Con 2015

Use 8051's power-down mode to the fullest

-July 06, 2000

The 8051 series µCs offer idle and power-down modes, both of which you invoke by setting appropriate control bits from the code. For instance, a 5V, 12-MHz Atmel AT89C2051 consumes approximately 9 mA in active mode, 1.8 mA in idle mode, and only 12 µA in power-down mode. Although power-down savings outperform those of the idle mode by two orders of magnitude, the only way to restore the AT89C2051's operation from a power-down state is to reset, which constitutes a serious drawback for system designers. This disadvantage holds true for most 8051-compatible processors; only high-end models wake from power-down state by interrupt. However, a simple method exists for using an ordinary 8051 in power-down mode with interrupt recovery. You can easily adapt the proposed solution for various requirements; the only assumption is that an external device, such as a keyboard or sensor, asserts an interrupt request, which is negated when the processor takes a specific action, such as reading the status register. When the µC has nothing to do, the program switches the external pin on the µC low, and the µC enters power-down mode.

The incoming interrupt request passes through the NOR gate (Figure 1a), causing a processor reset (Figure 1b). When the port pin is automatically high, the gate closes, negating the reset signal. Such a scenario requires an initialization program to distinguish between cold restart (power-up) and warm restart (wake-up). You can easily accomplish this function by checking whether locations in data memory match a predefined pattern (signature), which is set just before entering power-down mode. For details on the warm-restart concept, refer to application note AN424, "8051 family warm boot determinations" from Philips. Another problem is restoring special-function registers' contents-unlike internal data RAM, which remains unchanged, Special-function registers are automatically initialized upon reset. Depending on the application, some registers may always be set to predefined values, and some must be stored in data memory before entering power-down mode and reloaded during warm restart. Click here to download the necessary software listings. (DI #2557)


Loading comments...

Write a Comment

To comment please Log In

FEATURED RESOURCES