SAMV71 Xplained Ultra Software Package 1.3

RTC Example

Purpose

This basic example shows how to use the Real-Time Clock (RTC) peripheral available on the Atmel SAMV7 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.

Requirements

This package can be used with SAM V71 Xplained Ultra board.

Description

Upon startup, the program displays the currently set time and date and a menu to perform the following:

     Menu:
        t - Set time
        d - Set date
        i - Set time alarm
        m - Set date alarm
        c - Clear the alarm notification (only if it has been triggered)

Setting the time, date and time alarm is done by using Menu option "t", "d", the display is updated accordingly.

The time alarm is triggered only when the second, minute and hour match the pre-set values; the date alarm is triggered only when the month and date match the pre-set values. If both time alarm and date alarm are set, only when the second, minute, hour, month and date match the pre-set values, the alarm will be triggered.

Usage

  1. Build the program and download it inside the SAM V71 Xplained Ultra board. Please refer to the Getting Started with SAM V71 Microcontrollers.pdf

On the computer, open and configure a terminal application (e.g. HyperTerminal on Microsoft Windows) with these settings:

Start the application.

  1. In the terminal window, the following text should appear:
         -- RTC Example xxx --
         -- xxxxxx-xx
         -- Compiled: xxx xx xxxx xx:xx:xx --
    
         Menu:
         t - Set time
         d - Set date
         i - Set time alarm
         m - Set date alarm
         q - Quit
    
  2. Press one of the keys listed in the menu to perform the corresponding action.

References

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines