User`s manual
Rabbit 4000 Designer’s Handbook rabbit.com 77
9.2.3 External 32 kHz Oscillator
Unlike the Rabbit 2000, the Rabbit 4000 has no internal 32 kHz oscillator. Instead there is a clock input.
The recommended external crystal oscillator circuit and the associated battery backup circuit are discussed
in Technical Note 235 available on our website:
www.rabbit.com.
9.2.4 Conformal Coating of 32.768 kHz Oscillator Circuit
The 32.768 kHz oscillator circuit consumes microampere level currents. The circuit also has very high
input impedance, thus making it susceptible to noise, moisture and environmental contaminants. To avoid
leakage due to moisture and ionic contamination it is recommended that the oscillator circuit be conformal
coated. This is simplified if all components are kept on the same side of the board as the processor.
Feedthroughs that pass through the board and are connected to the oscillator circuit should be covered with
solder mask that will serve as a conformal coating for the back side of the board from the processor. Please
see Technical Note 303, “Conformal Coating,” and Technical Note 235 “External 32.768 kHz Oscillator
Circuits” on the Rabbit website for more information
www.rabbit.com/support/techNotes_whitePapers.shtml
9.2.5 Software Support for Sleepy Mode
In sleepy mode the microprocessor executes instructions too slowly to support most interrupts. Data will
probably be lost if interrupt-driven communication is attempted. The serial ports can function but cannot
generate standard baud rates when the system clock is running at 32.768 kHz or below.
The 48-bit battery-backable clock continues to operate without interruption.
Usually the programmer will want to reduce power consumption to a minimum for a fixed time 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 to 32.768 kHz, and the main oscillator is
powered down. The device may be run even slower by dividing the 32kHz oscillator by 2, 4, 8, or 16 with
the set32kHzDivider() call. When the 32kHz oscillator is divided, these slower modes are called
ultra sleepy modes.
On exiting sleepy mode by calling useMainOsc(), 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.
While in sleepy mode the user may call updateTimers() periodically to keep Dynamic C time vari-
ables 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. updateTimers()
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.
NOTE: In ultra sleepy modes, calling updateTimers() is not recommended.