How does it work?
RTC 14 Click as its foundation uses the ISL1221, a small micropower real-time clock that provides increased security features and tamper detection from Renesas. This device comes with time-stamp features in normal and battery modes, timing and crystal compensation, clock/calendar, power fail indicator, periodic or polled alarm, intelligent battery backup switching, and battery-backed user SRAM. With their enhanced security functionality, this RTC is ideally suited for various applications ranging from security, warranty monitoring, data collection, recording, and time-stamping single events, for example, recurring events such as the opening and closing a security door.
As mentioned before, the ISL1221 can time-stamp an external event by either issuing an output signal, containing the second, minute, hour, date, month, and year that the triggering event occurred, or by stopping the RTC registers from advancing at the moment the event occurs. The device also has calendar registers for a date, month, year, and day of the week, which is exceptionally accurate through 2099, with automatic leap year correction.
The alarm can be set to any clock/calendar value (for example, every minute, every Friday, or at 9:41 AM on September 10). The alarm status is available by checking the Status Register or available at the hardware interrupt pin routed to the INT pin of the mikroBUS™ socket. The alarm also contains a repeat mode allowing a periodic interrupt every minute, every hour, every day.
RTC 14 Click communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting a Fast Mode operation up to 400kHz. Also, it has the frequency output programmable from 32.768kHz to 1/32Hz, available at the PWM pin of the mikroBUS™ socket and onboard header pin labeled as FO. This feature is used for various timing applications, including clocking the MCU in sleep mode, eliminating external crystal, and further reducing the BOM. To use features such as external event input or frequency output available on onboard headers, it is necessary to populate the resistors R8 and R9 and thus activate these functions on the headers.
The most common RTC configuration, like this one, is a battery-backed up, which maintains time and may hold data in 2 bytes of battery-backed SRAM provided for data storage. That’s why, in addition to the ISL1221, the RTC 14 Click is equipped with a button cell battery holder compatible with the 3000TR battery holder, suitable for 12mm Coin Cell batteries.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. However, the Click board™ comes equipped with a library containing 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 various applications ranging from security, warranty monitoring, data collection, and recording due to its enhanced security functionality
On-board modules
ISL1221 – low-power RTC with battery-backed SRAM and event detection from Renesas
Key Features
Low power consumption, clock/calendar feature, security and event functions, frequency output with 15 selectable frequency, single alarm, battery back-up, and more
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on RTC 14 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 |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
J1 | FO | Unpopulated | Frequency Output Header |
J2 | EIN | Unpopulated | External Event Input Header |
RTC 14 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Battery Supply Voltage | 1.8 | – | 5.5 | V |
RTC Memory Size | – | – | 2 | bytes |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the RTC 14 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for RTC 14 Click driver.
Key functions:
rtc14_cfg_setup
– Config Object Initialization function.rtc14_init
– Initialization function.rtc14_default_cfg
– Click Default Configuration function.
Example description
This is an example that demonstrates the use of the RTC 14 click board™.
void application_task ( void ) { rtc14_get_time( &rtc14, &time ); Delay_ms( 1 ); rtc14_get_date( &rtc14, &date ); Delay_ms( 1 ); if ( time.sec != new_sec ) { log_printf( &logger, " Date : %.2d-%.2d-%.2d ", ( uint16_t ) date.day, ( uint16_t ) date.month, ( uint16_t ) date.year ); display_day_of_week( ); log_printf( &logger, " Time : %.2d:%.2d:%.2d ", ( uint16_t ) time.hours, ( uint16_t ) time.min, ( uint16_t ) time.sec ); log_printf( &logger, "%cMrn", ( time.am_pm == RTC14_SET_HOURS_FORMAT_12_PM ? 'P' : 'A' ) ); log_printf( &logger, "- - - - - - - - - - -rn" ); new_sec = time.sec; Delay_ms( 1 ); } }
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.RTC14
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.