How does it work?
RTC 11 Click is based on the AB0815, an ultra-low-power coupled with a highly sophisticated feature set, the real-time clock from Abracon LLC. The AB0815 serves as a full-function RTC and includes 3 feature groups: baseline and advanced timekeeping features, and power management. Functions from each feature group may be controlled via I/O offset mapped registers accessed through SPI serial interface. The baseline timekeeping feature group supports the standard 32.786 kHz crystal oscillation mode for maximum frequency accuracy with an ultra-low current draw of 22nA. This feature also includes a standard set of counters for minutes, hours, dates, months, years, and week-days. A complement of countdown timers and alarms may additionally be set to initiate interrupts or resets on several of the outputs.
The most common configuration as performed on this Click board™ is a battery backed up RTC, which maintains time and may hold data in RAM. In addition to the AB0815, the RTC 11 Click is equipped with the button cell battery holder compatible with the 3000TR battery holder, suitable for 12mm Coin Cell batteries. By utilizing an automatic backup switch, the AB0815 can use an external battery power source when there is no power supply on its main power terminals, thus allowing for uninterrupted operation.
The AB0815 communicates with MCU using the standard SPI serial interface that supports modes 0 and 3 with a maximum frequency of 2 MHz. The flexible inputs of the AB0815 can be used to aggregate a variety of interrupt sources, including external digital inputs, analog levels, timers, and alarms into a single interrupt source to an MCU. Based on this, functions like external interrupt or watchdog timer reset could be found on this Click board™ routed on the RST and AN pins of the mikroBUS™ socket labeled as EXI and WDI, as well as the primary and secondary interrupt outputs routed on the INT and PWM pins of the mikroBUS™ socket labeled as IT1 and IT2.
This Click board™ is designed to be operated only with a 3.3V logic voltage level. A proper logic voltage level conversion should be performed before the Click board™ is used with MCUs with different logic levels. However, the Click board™ comes equipped with a library that contains easy to use functions and an example code that can be used as a reference for further development.
Specifications
Type
RTC
Applications
Can be used for applications such as portable applications, wearables, medical equipment, and similar.
On-board modules
RTC 11 Click is based on the AB0815, an ultra-low-power coupled with a highly sophisticated feature set, the real-time clock from Abracon LLC.
Key Features
Low power consumption, battery backup, programmable counters, alarms for timer and watchdog functions, and more.
Interface
SPI
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on RTC 11 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
RTC 11 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.3 | 3.3 | 3.8 | V |
Battery Supply Voltage | 1.4 | – | 3.6 | V |
Maximum Output Current | -20 | – | 20 | mA |
SPI Clock Frequency | – | – | 2 | MHz |
Operating Temperature Range | -40 | – | +85 | °C |
Software Support
We provide a library for the RTC 11 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enables the usage of the RTC 11 Click board. User can set or read time, date, day of the week, alarm, change settings, or use generic read and write functions.
Key functions:
void rtc11_set_time ( uint8_t t_hrs, uint8_t t_min, uint8_t t_sec );
– Function is used to set system time.void rtc11_get_time ( uint8_t *t_hrs, uint8_t *t_min, uint8_t *t_sec );
– Function is used to get current system time.void rtc11_get_date ( uint8_t *w_day, uint8_t *d_day, uint8_t *d_mon, uint8_t *d_yrs );
– Function is used to get system date.
Examples description
The application is composed of three sections :
- System Initialization – Initializes GPIO, SPI and LOG structures, sets INT and PWM pins as input, and AN, RST and CS pins as output, and start to write log.
- Application Initialization – Initalizes SPI, performs software reset, sets system time and date, and starts clocking system.
- Application Task – Demonstrates use of RTC 11 click board by reading and displaying time and date via USART terminal.
void application_task ( ) { rtc11_get_time ( &t_hrs, &t_min, &t_sec ); Delay_ms( 10 ); rtc11_get_date ( &w_day, &d_day, &d_mon, &d_yrs ); Delay_ms( 10 ); if ( sec_flag != t_sec ) { mikrobus_logWrite( " Time: ", _LOG_TEXT ); ByteToStr( t_hrs, log_txt ); ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( ":", _LOG_TEXT ); ByteToStr( t_min, log_txt ); ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( ":", _LOG_TEXT ); ByteToStr( t_sec, log_txt ); ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "", _LOG_LINE ); mikrobus_logWrite( " Date: ", _LOG_TEXT ); disp_day_of_the_week( w_day ); mikrobus_logWrite( "/", _LOG_TEXT ); ByteToStr( d_day, log_txt ); ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "/", _LOG_TEXT ); ByteToStr( d_mon, log_txt ); ltrim( log_txt ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "/", _LOG_TEXT ); ByteToStr( d_yrs, log_txt ); ltrim( log_txt ); mikrobus_logWrite( "20", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_TEXT ); mikrobus_logWrite( "/", _LOG_TEXT ); mikrobus_logWrite( "", _LOG_LINE ); } sec_flag = t_sec; }
Additional Function :
- void disp_day_of_the_week ( uint8_t w_day ) – Writes the day of the week on USART terminal.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- SPI
- UART
- Conversions
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.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.