12.07.2015 Views

Rabbit 2000™ Microprocessor - UTN

Rabbit 2000™ Microprocessor - UTN

Rabbit 2000™ Microprocessor - UTN

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9.1 Software Support for Low-Power Sleepy ModesIn 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 at32.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 fixedtime period or until some external event takes place. On entering sleepy mode by calling use32kHzOsc(), the periodic interrupt is completely disabled, the system clock is switched to32.768 kHz, and the main oscillator is powered down. On exiting sleepy mode by calling useMainOsc(), the main oscillator is powered up, a time delay is inserted to be sure that it hasresumed regular oscillation, and then the system clock is switched back to the main oscillator. Atthis point the periodic interrupt is reenabled. Data will probably be lost if interrupt-driven communicationis attempted while in sleepy mode.While in sleepy mode the user has available a routine, updateTimers(), that can be calledperiodically to keep Dynamic C time variables updated. These time variables keep track of secondsand milliseconds and are normally used by Dynamic C routines to measure time intervals orto wait for a certain time or date. This routine reads the real-time clock and then computes newvalues for the Dynamic C time variables. The normal method of updating these variables is theperiodic interrupt that takes place 2048 times per second.9.2 Baud Rates in Sleepy ModeThe available baud rates in sleepy mode are 1024, 1024/2, 1024/3, 1024/4, etc. (The baud rate113.77 is available as 1024/9 and may be useful for communicating with other systems operatingat 110 bps - a 3.4% mismatch. In addition the standard PC compatible UART 16450 with a baudrate divider of 113 generates a baud rate of 1019 bps, a 0.5% mismatch with 1024 bps. Baud ratemismatches of up to 5% may be tolerated.) If there is a large baud rate mismatch, the serial portcan usually detect that a character has been sent to it, but can not read the exact character.Designer’s Handbook 49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!