This simple example shows how to use the 32-bit Real Time Counter (RTC32).
All AVR XMEGA devices with a RTC32 can be used. This example have been tested with the following setup:
The following setup is required on STK600:
Optional:
The example will initalize the RTC32 and use the STK600 LEDS to show the last two digits from time in binary coded decimal (BCD).
Due to the nature of the RTC32; alarms can't be given faster than every third RTC32 clock cycle. And with a RTC32 clock cycle of 1Hz the LEDS will only update every third second.
Since the RTC32 is battery backed up it can keep track of it's time in the case of reset or power off. See Setup for details on this.
This example depends on the following modules:
This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.
For further information, visit Microchip.