OFF
MIKROE-947
36 g
Status:
RTC Click is a compact add-on board that measures the passage of real-time. This board features the PCF8583, a clock, and a calendar with 240x8-bit RAM from NXP Semiconductors based on a 2048-bit static CMOS RAM organized as 256 words by 8 bits. The PCF8583 provides information like seconds, minutes, hours, days, months, years, and dates based on a 32.768kHz quartz crystal through an I2C serial interface to transmit time and calendar data to the MCU. It also has automatic leap year compensation, low power consumption, and full RTC functions such as battery backup, programmable event counters, and alarms for timer and watchdog functions. This Click board™ makes the perfect solution for the development of various time-keeping applications, including daily alarms, metering applications, and others requiring an accurate RTC for their operation.
RTC Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
This product is no longer in stock
Availability date:
RTC Click is based on the PCF8583, a clock, and a calendar with 240x8-bit RAM from NXP Semiconductors. It is a low-power, full binary-coded decimal (BCD) clock/calendar which takes care of a 4-year calendar and a 24h/12h time format that works in several modes. The PCF8583’s counter function mode consists of a clock and event-counter modes. In clock mode, the hundredths of a second, seconds, minutes, hours, date, month (four-year calendar), and weekday are stored in a BCD format. The timer register stores for up to 99 days. The event counter mode counts pulses applied to the oscillator input. The event counter stores up to 6 digits of data.
The alarm function mode consists of a dated alarm, a daily alarm, a weekday alar, or a timer alarm, which can be programmed. When an alarm event occurs, the alarm flag is set and will remain set until directly reset by a write operation. The alarm function can be disabled. The timer function can also be enabled. The timer counts from 0 (or a programmed value) up to 99, after which the timer resets to 0. In addition, a timer can be programmed so that when the value of the timer equals the pre-programmed value, the alarm will be triggered.
This Click board™ communicates with the MCU using the standard I2C 2-Wire interface to read data and configure settings with up to 100kHz frequency. The interrupt occurs when the alarm or the timer flag is set, with the corresponding interrupt signaled over the INT pin of the mikroBUS™ socket. The RTC Click also features a 3V/230mA lithium battery as a backup power supply, ensuring that timekeeping operation continues even when the main power supply goes off.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the PWR SEL jumper. This way, both 3.3V and 5V capable MCUs can use the 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.
Type
RTC
Applications
Can be used for the development of various time-keeping applications, including daily alarms, metering applications, and others requiring an accurate RTC for their operation
On-board modules
PCF8583 - clock/calendar with 240x8-bit RAM from NXP Semiconductors
Key Features
4-hour/12-hour time format, four-year calendar, universal timer with alarm and overflow indication, clock function, programmable alarm, timer, and interrupt functions, backup battery, 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
This table shows how the pinout on RTC Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1 | PWR SEL | Down | Power/Logic Level Voltage Selection 3V3/5V: Down position 3V3, Up position 5V |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
Memory Size | - | 240 | - | bit |
Date Format | YYYY-MM-DD |
We provide a library for the RTC Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on MIKROE github account.
Library Description
This library contains API for RTC Click driver.
Key functions
rtc_c_set_time
Function sets time: hours, minutes and seconds data to the target register address of PCF8583 chip on RTC Click.
rtc_c_get_time
Function gets time: hours, minutes and seconds data from the target register address of PCF8583 chip on RTC Click.
rtc_c_enable_disable_counting
Function that enables or disables counting on RTC Click.
Example Description
This application enables setup and measurement of time with RTC Click.
void application_task ( void )
{
static uint8_t time_seconds_new = 0xFF;
rtc_c_get_time( &rtc_c );
if ( time_seconds_new != rtc_c.time.time_seconds )
{
log_printf( &logger, " Time : %.2u:%.2u:%.2urn",
( uint16_t ) rtc_c.time.time_hours,
( uint16_t ) rtc_c.time.time_minutes,
( uint16_t ) rtc_c.time.time_seconds );
log_printf( &logger, "------------------rn" );
time_seconds_new = rtc_c.time.time_seconds;
}
Delay_ms ( 500 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on MIKROE github account.
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. UART terminal is available in all MIKROE compilers.
This Click board™ is supported with mikroSDK - MIKROE 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.
NOTE: Please be advised that any peripheral devices or accessories shown connected to the Click board™ are not included in the package. Check their availability in our shop or in the YMAN section below.