This basic example shows how to use the Real-Time Clock (RTC) peripheral available on the newest Atmel AT91 microcontrollers. The RTC enables easy time and date management and allows the user to monitor events like a configurable alarm, second change, calendar change, and so on.
This project works on the following Atmel evaluation kits:
Upon startup, the program displays the currently set time and date (00:00:00, 2007-Jan-01 at reset) and a menu to perform the following:
Setting the time, date and time alarm is done by using the 'i', 'j', 'k' and 'l' keys to either move the selection from left to right ('j' and 'l') or increase/decrease the currently selected value ('i' and 'k'). Pressing enter validates the current selection; the display is updated accordingly.
It is possible to make the time alarm only match the second, minute or hour value; or any combination of the three. To disable matching for one value, select it, and increase/decrease the value until it appears as 'XX': this indicates matching is disabled.
-- Basic RTC Project 1.4 --
Time: 00:10:47
Date: Mon, 2007-Jan-01
Menu:
t - Set time
d - Set date
i - Set time alarm