User’s Manual
17
•
LOW_POWER.C
—demonstrates how to implement a function in RAM to reduce power
consumption by the Rabbit microprocessor. There are four features that lead to the low-
est possible power draw by the microprocessor.
1. Run the CPU from the 32 kHz crystal.
2. Turn off the high-frequency crystal oscillator.
3. Run from RAM.
4. Ensure that internal I/O instructions do not use CS0.
Once you are ready to compile and run this sample program, use
<Alt-F9>
instead of
just
F9
. This will disable polling, which will allow Dynamic C to continue debugging
once the target starts running off the 32 kHz oscillator.
This sample program will toggle LEDs DS2 and DS3 on the Prototyping Board. You
may use an oscilloscope. DS2 will blink the fastest. After switching to low power, both
LEDs will blink together.
•
TAMPERDETECTION.C
—demonstrates how to detect an attempt to enter the bootstrap
mode. When an attempt is detected, the battery-backed onchip-encryption RAM on the
Rabbit 4000 is erased. This battery-backed onchip-encryption RAM can be useful to
store data such as an AES encryption key from a remote location.
This sample program shows how to load and read the battery-backed onchip-encryption
RAM and how to enable a visual indicator.
Once this sample is compiled running (you have pressed the
F9
key while the sample
program is open), remove the programming cable and press the reset button on the
Prototyping Board to reset the module. LEDs DS2 and DS3 will be flashing on and off.
Now press switch S2 to load the battery-backed RAM with the encryption key. The
LEDs are now on continuously. Notice that the LEDs will stay on even when you press
the reset button on the Prototyping Board.
Reconnect the programming cable briefly and unplug it again. The LEDs will be flash-
ing because the battery-backed onchip-encryption RAM has been erased. Notice that
the LEDs will continue flashing even when you press the reset button on the Prototyp-
ing Board.
You may press switch S2 again and repeat the last steps to watch the LEDs.
•
TOGGLESWITCH.C
—demonstrates the use of costatements to detect switch presses
using the press-and-release method of debouncing. LEDs DS2 and DS3 on the Proto-
typing Board are turned on and off when you press switches S2 and S3. S2 and S3 are
controlled by PB4 and PB5 respectively.
Once you have loaded and executed these five programs and have an understanding of
how Dynamic C and the RCM4000 modules interact, you can move on and try the other
sample programs, or begin building your own.
Summary of Contents for RabbitCore RCM4000
Page 6: ...RabbitCore RCM4100...
Page 12: ...6 RabbitCore RCM4000...
Page 20: ...14 RabbitCore RCM4000...
Page 46: ...40 RabbitCore RCM4000...
Page 68: ...62 RabbitCore RCM4000...
Page 82: ...76 RabbitCore RCM4000...
Page 96: ...90 RabbitCore RCM4000...
Page 114: ...108 RabbitCore RCM4000...
Page 118: ...112 RabbitCore RCM4000...
Page 122: ...116 RabbitCore RCM4000...
Page 124: ......