<< Previous | Index | Next >>

> ## Chapter 9. Low-Power Design and Support

> To get the most computation for a given power level, the operating voltage should be approximately 3.3 V. At a given operating voltage, the clock speed should be reduced as much as possible to obtain the minimum power consumption that is acceptable.

> Some applications, such as a control loop, may require a continuous amount of computational power. Other applications, such as slow data logging or a portable test instrument, may spend long periods with low computational requirements interspersed with short periods of high computational load.

> The current (and thus power) consumption of a microprocessor-based system generally consists of a part that is independent of frequency and a part that depends on frequency. The part that is independent of frequency consists of leakage or current or current drawn by special circuits such as pullup resistors or circuits that continuously draw power. Ordinary CMOS logic uses power when it is switching from one state to another, and this is the power that is dependent on frequency. The power drawn while switching is used to charge capacitance or is used when both N and P FETs are simultaneously on for a brief period during a transition.

> Floating inputs or inputs that are not solidly either high or low can also draw current because both N and P FETs are turned on at the same time. To avoid excessive power consumption, floating inputs should not be included in a design (except that some inputs may float briefly during power-on sequencing). Most unused inputs on the Rabbit can be made into outputs by proper software initialization to remove the floating property. Pullup resistors will be needed on a few inputs that cannot be programmed as outputs. An alternative to a pullup resistor is to tie an unused output to the unused inputs. If pullup (or pulldown) resistors are required, they should be made as large as possible if the circuit in question has a substantial part of its duty cycle with current flowing through the resistor.

> Figure 9-1. Rabbit Clock Distribution

> For extreme low-power operation, take into account that some memory chips draw substantial current at zero frequency. For example, a Samsung static RAM (part number KM684000BPL-7L) was found to draw 1 mA at 5 V when chip select and output enable were held enabled and all the other signals were held at fixed levels (a long read). When the microprocessor is operating at the slowest frequency (32 kHz clock), the memory cycle is about 64 µs and the memory chip spends most of its time with the chip enable and output enable on. The current draw during a long read cycle is not specified in most memory data sheets. The Samsung chip, according the data sheet, typically draws about 4 mA per megahertz when it is operating. However, it appears that current consumption curve flattens out at about 250 kHz because of the constant 1 mA draw during a long read.

> To take full advantage of the Rabbit's ultra slow sleepy execution modes, a memory that does not consume power during a static read is required. Advanced Micro Devices has a line of 3 V flash memories (AM29LV010, AM29LV040) that power down automatically whenever the address (and control) lines do not change for a period of time slightly longer than the access time. These memories will consume on the order of 30 µA when operated at a data rate of 1/64 MHz.

> Prior to version 7.10, Dynamic C did not allow debugging with flash chips having sector sizes greater than 4096 bytes, nor did the flash drivers provided in the Dynamic C libraries support such flash chips. To use a large sector flash in your product design if you are using a version of Dynamic C prior to 7.10, you can debug your application in RAM by using the "Compile to RAM" compiler option, or use a board with small sector flash for development only.

> The Rabbit low-power sleepy mode of operation is achieved by switching the main clock to the 32.768 kHz clock and then disabling the main oscillator. In this mode, the Rabbit executes about 3 instructions every millisecond. Adding memory wait states can further slow the processor to about 500 instructions per second or one every 2 ms. At these speeds the power consumed by the microprocessor, exclusive of the 32.768 kHz oscillator, is very low, in the area of 50 µA to 100 µA. The Rabbit will generally test for some external event and leave sleepy mode when that event is detected. The 32.768 kHz oscillator is a major consumer of power, requiring approximately 80 µA at 3.3 V. This drops dramatically to about 18 µA at 2.2 V. For the lowest standby power it may be desirable to use an external oscillator to generate the 32.768 kHz clock. The Intersil (formerly Harris) part HA7210 can be used to construct a 32.768 kHz oscillator that consumes approximately 5 µA at 3.3 V.

> For the very lowest power consumption the processor can execute a long string of `mul` instructions with the de and bc registers set to zero. Few if any internal registers change during the execution of a string of `mul` zero by zero, and a memory cycle takes place only once in every 12 clocks. By combining all these techniques it may be possible to get the sleepy current under 50 µA.

> ### 9.1 Software Support for Low-Power Sleepy Modes

> In sleepy mode the microprocessor executes instructions too slowly to support most interrupts. The serial ports can function but cannot generate standard baud rates since the system clock is at 32.768 kHz. The 48-bit battery backable clock continues to operate without interruption.

> Usually the programmer will want to reduce power consumption to a minimum, either for a fixed time period or until some external event takes place. On entering sleepy mode by calling use `32kHzOsc()`, the periodic interrupt is completely disabled, the system clock is switched to 32.768 kHz, and the main oscillator is powered down. On exiting sleepy mode by calling use `MainOsc()`, the main oscillator is powered up, a time delay is inserted to be sure that it has resumed regular oscillation, and then the system clock is switched back to the main oscillator. At this point the periodic interrupt is reenabled. Data will probably be lost if interrupt-driven communication is attempted while in sleepy mode.

> While in sleepy mode the user has available a routine, `updateTimers()`, that can be called periodically to keep Dynamic C time variables updated. These time variables keep track of seconds and milliseconds and are normally used by Dynamic C routines to measure time intervals or to wait for a certain time or date. This routine reads the real-time clock and then computes new values for the Dynamic C time variables. The normal method of updating these variables is the periodic interrupt that takes place 2048 times per second.

> ### 9.2 Baud Rates in Sleepy Mode

> The available baud rates in sleepy mode are 1024, 1024/2, 1024/3, 1024/4, etc. (The baud rate 113.77 is available as 1024/9 and may be useful for communicating with other systems operating at 110 bps - a 3.4% mismatch. In addition the standard PC compatible UART 16450 with a baud rate divider of 113 generates a baud rate of 1019 bps, a 0.5% mismatch with 1024 bps. Baud rate mismatches of up to 5% may be tolerated.) If there is a large baud rate mismatch, the serial port can usually detect that a character has been sent to it, but can not read the exact character.

Rabbit 2000 Designer's Handbook | << Previous | Index | Next>> | rabbit.com