rtc6
2.0.0.0
|
RTC6 click carries Microchip’s MCP79410 Real-Time Clock/Calendar IC with built-in 64 bytes of battery-backed SRAM an additional 1 Kbit of EEPROM.
We provide a library for the Rtc6 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Rtc6 Click driver.
void rtc6_cfg_setup ( rtc6_cfg_t *cfg );
RTC6_RETVAL rtc6_init ( rtc6_t *ctx, rtc6_cfg_t *cfg );
void rtc6_default_cfg ( rtc6_t *ctx );
void rtc6_battery_enable ( rtc6_t *ctx );
void rtc6_get_gmt_time ( rtc6_t *ctx, rtc6_time_t *gmt_time );
void rtc6_get_local_time ( rtc6_t *ctx, rtc6_time_t *local_time );
This application enables usage of Real-TIme clock and calendar with alarm on RTC 6 click.
The demo application is composed of two sections :
Initializes driver init, sets time zone, sets UTC-GMT time and alarm time
Reads GMT time and Local time. Checks if the alarm is activated. If the alarm is active, it disable alarm and adjusts the new one within 20 seconds. Logs this data on USBUART every 900ms.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.