RTC 16 Click-Platine
RTC 16 Click-Platine
Key Features
- Basierend auf dem BU9873, einer CMOS-Echtzeituhr mit integrierter Interrupt-Generierungsfunktion von Rohm Semiconductors
- Niedriger Stromverbrauch, Uhr-/Kalenderfunktion, programmierbarer Perioden- und Alarm mit Unterbrechungsmöglichkeit, Batterie-Backup, 32-kHz-Taktausgang, automatische Schaltjahrerkennung bis zum Jahr 2099 und mehr
- Kann für verschiedene Zeitmessungsanwendungen verwendet werden, einschließlich täglicher Alarme, Messanwendungen und anderer Anwendungen, für deren Betrieb eine genaue Echtzeituhr erforderlich ist
Overview
Das RTC 16 Click Board™ ist eine kompakte Zusatzplatine, die die Tageszeit genau angibt. Diese Platine verfügt über die BU9873, eine CMOS-Echtzeituhr mit integrierter Interrupt-Generierungsfunktion von Rohm Semiconductors. Die BU9873 bietet Jahr, Monat, Tag, Wochentag, Stunden, Minuten und Sekunden basierend auf einem 32,768-kHz-Quarzkristall. Diese RTC ist über eine I2C-Schnittstelle mit der MCU verbunden und für die serielle Übertragung von Zeit- und Kalenderdaten konfiguriert. Sie verfügt außerdem über eine Alarmfunktion, die ein Interrupt-Signal an die MCU ausgibt, wenn der Wochentag, die Stunde oder die Minute mit der voreingestellten Zeit übereinstimmt. Diese Click Board™ ist für verschiedene Zeitmessanwendungen geeignet, einschließlich Tagesalarme, Messanwendungen und andere, die für ihren Betrieb eine genaue RTC benötigen.
Das RTC 16 Click Board™ wird von einer mikroSDK-kompatiblen Bibliothek unterstützt, die Funktionen enthält, die die Softwareentwicklung vereinfachen. Dieses Click Board™ wird als vollständig getestetes Produkt geliefert und ist bereit für den Einsatz auf einem System, das mit der mikroBUS™-Buchse ausgestattet ist.
How Does The RTC 16 Click Board™ Work?
The RTC 16 Click Board™ is based on the BU9873, an I2C configurable real-time clock/calendar optimized for low power operations from Rohm Semiconductors. The BU9873 is configured to perform the serial transmission of calendar and time data to the MCU and comes with an integrated interrupt generation function. It also contains a built-in high-precision oscillation adjustment circuit which enables the adjustment of time counts with a digital method and correct deviations in the oscillation frequency of the crystal oscillator. This RTC is also characterized by an automatic leap year recognition until the future 2099 year.
The RTC 16 Click Board™ communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings, supporting a Fast Mode operation up to 400kHz. An alarm and interrupt function is also available that outputs an interrupt signal to the INT pin of the mikroBUS™ socket when the day of the week, hour, or minute matches with the preset time. An alarm may be selectable between ON and OFF for each day of the week, allowing outputting warning every day or on a specific day indicated by a red LED marked as ALARM. Besides, the RTC 16 Click also has an onboard header labelled CLKOUT, which provides clock pulses of 32kHz.
The most common RTC configuration, like this one, is a battery-backed up, which maintains time and continues its work without interruption in the event of a power failure. That's why, in addition to the BU9873, the RTC 16 Click is equipped with a button cell battery holder compatible with the 3000TR battery holder, suitable for 12mm Coin Cell batteries.
The RTC 16 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 communication lines properly. 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 | The RTC 16 Click Board™ can be used for various time-keeping applications, including daily alarms, metering applications, and others requiring an accurate RTC for their operation |
On-board modules | BU9873 - CMOS real-time clock that has a built-in interrupt generation function from Rohm Semiconductors |
Key Features | Low power consumption, clock/calendar feature, programmable periodic and alarm with interrupt capability, battery back-up, 32kHz clock output, automatic leap year recognition up to the year 2099, and more |
Interface | I2C |
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 of the RTC 16 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
NC | 2 | RST | INT | 15 | INT | Interrupt | |
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | 5V | Power Supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
LD2 | ALARM | - | Alarm LED Indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
J1 | CLKOUT | Unpopulated | 32kHz Clock Output Header |
RTC 16 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
Clock Output CLKOUT | - | 32 | - | kHz |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the RTC 16 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Library Description
This library contains API for the RTC 16 Click Board™ driver.
Key functions
-
rtc16_set_time
This function sets the starting time values - second, minute and hour. -
rtc16_read_time
This function reads the current time values - second, minute and hour. -
rtc16_read_date
This function reads the current date values - day of week, day, month and year.
Example Description
This example demonstrates the use of the RTC 16 Click Board™ by reading and displaying the time and date values.
void application_task ( void )
{
// Wait for interrupt which is synchronized with second count-up
while ( rtc16_get_int_pin ( &rtc16 ) );
rtc16_clear_interrupts ( &rtc16 );
if ( RTC16_OK == rtc16_read_time ( &rtc16, &time ) )
{
log_printf( &logger, " Time: %.2u:%.2u:%.2urn",
( uint16_t ) time.hour, ( uint16_t ) time.minute, ( uint16_t ) time.second );
}
if ( RTC16_OK == rtc16_read_date ( &rtc16, &date ) )
{
log_printf( &logger, " Date: %s, %.2u.%.2u.20%.2u.rnn",
rtc16_get_day_of_week_name ( date.day_of_week ),
( uint16_t ) date.day, ( uint16_t ) date.month, ( uint16_t ) date.year );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Other MikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.RTC16
Additional Notes and Information
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 MikroElektronika compilers.
MIKROSDK
The RTC 16 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.
Software Support
We provide a library for the RTC 16 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Library Description
This library contains API for the RTC 16 Click Board™ driver.
Key functions
-
rtc16_set_time
This function sets the starting time values - second, minute and hour. -
rtc16_read_time
This function reads the current time values - second, minute and hour. -
rtc16_read_date
This function reads the current date values - day of week, day, month and year.
Example Description
This example demonstrates the use of the RTC 16 Click Board™ by reading and displaying the time and date values.
void application_task ( void )
{
// Wait for interrupt which is synchronized with second count-up
while ( rtc16_get_int_pin ( &rtc16 ) );
rtc16_clear_interrupts ( &rtc16 );
if ( RTC16_OK == rtc16_read_time ( &rtc16, &time ) )
{
log_printf( &logger, " Time: %.2u:%.2u:%.2urn",
( uint16_t ) time.hour, ( uint16_t ) time.minute, ( uint16_t ) time.second );
}
if ( RTC16_OK == rtc16_read_date ( &rtc16, &date ) )
{
log_printf( &logger, " Date: %s, %.2u.%.2u.20%.2u.rnn",
rtc16_get_day_of_week_name ( date.day_of_week ),
( uint16_t ) date.day, ( uint16_t ) date.month, ( uint16_t ) date.year );
}
}
The full application code, and ready to use projects can be installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Other MikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.RTC16
Additional Notes and Information
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 MikroElektronika compilers.
MIKROSDK
The RTC 16 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.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.