RTC 8 Click-Platine
RTC 8 Click-Platine
Key Features
- RTC 8 click ist eine perfekte Lösung für die Entwicklung des IoT, tragbarer und portabler Geräte, Protokollierungsgeräte, industrieller und gesundheitsbezogener Zeiterfassungsanwendungen und aller anderen Anwendungen, die für verschiedene Zwecke eine genaue Zeitbasis erfordern.
- Basierend auf dem RV-3028-C7, einem Echtzeituhr-/Kalendermodul (RTC) mit extrem niedrigem Stromverbrauch von Micro Crystal Switzerland
- Umfangreiche Interrupt-Event-Reporting-Engine, Möglichkeit zur Verwendung einer Backup-Batterie, Erhaltungsladung der Batterie für längeren Betrieb, bietet sowohl Standardzeit/-datum als auch den UNIX 32-Bit-Zeitzähler und mehr
- Verwendet den I2C-Bus
Das RTC 8 Click Board™ ist ein Echtzeituhrmodul mit extrem niedrigem Stromverbrauch, sodass es über einen längeren Zeitraum mit einer einzigen Knopfzellenbatterie verwendet werden kann. Das auf dem RTC 8 Click Board™ aufgebaute RV-3028-C7-Modul kann die Zeit sowohl im Standardformat als auch im 32-Bit-UNIX-Format ausgeben. Ein integrierter, werkseitig kalibrierter Quarz mit 32,768 kHz sorgt für eine sehr geringe Zeitabweichung.
Die Kompensations- und Offsetdaten werden im internen nichtflüchtigen Speicher abgelegt. Es besteht auch die Möglichkeit, die Konfigurationsparameter mit einem Passwort zu schützen. Eine erweiterte Interrupt-Funktion ermöglicht viele verschiedene Einsatzmöglichkeiten wie Alarmfunktion, Countdown-Timer-Funktion, externe Ereigniserkennungsfunktion mit Zeitstempel und vieles mehr.
Features such as the ability to be powered over the button cell battery, external event capture pin, several time output formats including the 32-bit UNIX counter format, and above all – an extremely low-power consumption, make the RTC 8 Click Board™ a perfect solution for the development of the IoT, wearable and portable applications, logging devices, industrial and health-related time metering applications, and all the other applications that require an accurate RTC for their operation
How Does The RTC 8 Click Board™ Work?
The RTC 8 Click Board™ is based on the RV-3028-C7, an extreme low-power real-time clock/calendar (RTC) module from Micro Crystal Switzerland. Thanks to its high integration level, this module provides high time accuracy, factory calibrated to 1 ppm, with a very low count of external components required. It has a full RTC function, offering programmable counters, alarms, and an interrupt engine with selectable event reporting sources. In addition to a standard clock output function, it also offers a 32-bit UNIX Time counter. The operational parameters are stored within the internal non-volatile memory (EEPROM) allowing their persistence in the event of the complete power failure. The small dimension of the RV-3028-C7 module itself, allow it to be used in very space-constrained applications, including wearables, medical equipment, and similar.
In addition to the RV-3028-C7, RTC 8 Click Board™ is equipped with the button cell battery holder compatible with the CR1225 battery. By utilising an automatic backup switch, the IC is able to use an external battery power source when there is no power supply on its main power terminals, thus allowing for uninterrupted operation. Draining as low as 40nA of current, it can be operated with the standard button cell battery almost indefinitely. In addition, a trickle charge system will replenish the battery power while the RV-3028-C7 is powered over the main power terminals (VDD, VSS). The voltage of the main power supply can range between 1.2V up to 5.5V.
The RV-3028-C7 uses the I2C communication protocol for the communication with the host MCU. Besides the I2C bus lines, two additional pins are also available on the RV-3028-C7, allowing an interrupt to be reported to the host MCU, but also to capture an external event and marking it with an automatic timestamp. The user is able to set up standard clock and calendar functions (including seconds, minutes, hours, weekdays, date, months, years with leap year correction), as well as the interrupt functions for the periodic countdown timer, periodic time update, alarm, external event, automatic backup switchover and power on reset (POR) events. All these features are available when the module is operated over the backup power supply (battery)
A group of configuration registers is used to set up all the various working parameters of the device. To additionally prevent any unintentional changes of the internal registers, the RV-3028-C7 offers password protection of its configuration. If the password protection is set by an enable register in the non-volatile memory, each time the register configuration is attempted, the user will be required to enter the password first. Naturally, reading out the password registers will return 0 values; this register is write-only.
Besides other functions, EEPROM memory holds the offset correction values. Offset correction is required for fine-tuning the internal 32.768 kHz XTAL, as well as for compensating the aging phenomenon.
As mentioned before, the RV-3028-C7 is able to be operated across a wide voltage range, from 1.2V to 5.5V. This allows adding a small SMD jumper on the board, used to select between 3.3V and 5V for its main power supply.
SPECIFICATIONS
Type | RTC |
Applications | The RTC 8 Click Board™ is a perfect solution for the development of the IoT, wearable and portable devices, logging devices, industrial and health-related time metering applications, and all the other applications that require an accurate time-base for various purposes. |
On-board modules | RV-3028-C7, an extreme low-power real-time clock/calendar (RTC) module from Micro Crystal Switzerland |
Key Features | Extensive interrupt event reporting engine, ability to use a backup battery, trickle charging of the battery for extended operation, provides both standard time/date, as well as the UNIX 32-bit time counter, 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 on RTC 8 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 OUT | |
External Event IN | EVI | 3 | EVI | TX | 14 | NC | |
NC | 4 | SCK | RX | 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
Designator | Name | Default | Description |
---|---|---|---|
PWR | PWR | - | Power LED Indicator |
VCC SEL | VCC SEL | Left | Power supply voltage selection: left position 3.3V, right position 5V |
Software Support
Software Support
We provide a library for the RTC 8 Click Board™ 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 initializes and defines the I2C drivers and drivers that offer a choice of writing data in register and reading data from the register in BCD and DEC format. The library includes function for sets Time, Date, new Alarm and set/get UNIX time. The user can set and read Time and Date data, especially using the functions for reading and writing data. The library includes functions for setting the desired alarm, disabling alarm and checking whether an alarm has been activated.
Key Functions
uint8_t rtc8_readData(uint8_t reg)
- Read one byte data from register in DEC format.uint32_t rtc8_getUNIX()
- Get current UNIX time.uint8_t rtc8_setTime(uint8_t _hours, uint8_t _minutes, uint8_t _seconds)
- Set new start time - 24 hour format.uint8_t rtc8_setDate(uint8_t _date, uint8_t _month, uint8_t _year)
- Set new start date.
Example Description
The application is composed of the three sections :
- System Initialization - Initializes I2C module and sets INT pin as INPUT and CS pin as OUTPUT.
- Application Initialization - Initialization driver init, settings RTC for work and sets start time/date and new alarm.
- Application Task - Read current Time, Date and UNIX time and checks if the alarm is active.
Note: Comment the lines for setting date and time if you would like the module to keep counting time after a reset or shut down.
void applicationTask() { uint8_t seconds; uint8_t minutes; uint8_t hours; uint8_t _weekday; uint8_t date; uint8_t month; uint8_t year; uint8_t status; uint32_t UNIX_time; char demoText[50]; // Time seconds = rtc8_readData(_RTC8_REG_SECONDS); minutes = rtc8_readData(_RTC8_REG_MINUTES); hours = rtc8_readData(_RTC8_REG_HOURS); // Date _weekday = rtc8_readData(_RTC8_REG_WEEKDAY); date = rtc8_readData(_RTC8_REG_DATE); month = rtc8_readData(_RTC8_REG_MONTH); year = rtc8_readData(_RTC8_REG_YEAR); status = rtc8_readByte(_RTC8_REG_STATUS); // Unix time UNIX_time = rtc8_getUNIX(); mikrobus_logWrite( "Time: ", _LOG_TEXT ); // Houes IntToStr(hours, demoText); Ltrim(demoText); mikrobus_logWrite( demoText, _LOG_TEXT ); // Minute mikrobus_logWrite(":", _LOG_TEXT); IntToStr(minutes, demoText); Ltrim(demoText); mikrobus_logWrite(demoText, _LOG_TEXT); // Seconds mikrobus_logWrite(":", _LOG_TEXT); IntToStr(seconds, demoText); Ltrim(demoText); mikrobus_logWrite(demoText, _LOG_LINE); mikrobus_logWrite( "Weekday: ", _LOG_TEXT ); IntToStr(_weekday, demoText); Ltrim(demoText); mikrobus_logWrite( demoText, _LOG_LINE ); mikrobus_logWrite( "Date: ", _LOG_TEXT ); // Date IntToStr(date, demoText); Ltrim(demoText); mikrobus_logWrite( demoText, _LOG_TEXT ); // Month mikrobus_logWrite(".", _LOG_TEXT); IntToStr(month, demoText); Ltrim(demoText); mikrobus_logWrite(demoText, _LOG_TEXT); // Year mikrobus_logWrite(".", _LOG_TEXT); IntToStr(year, demoText); Ltrim(demoText); mikrobus_logWrite(demoText, _LOG_LINE); mikrobus_logWrite( "UNIX: ", _LOG_TEXT ); LongWordToStr(UNIX_time, demoText); Ltrim(demoText); mikrobus_logWrite( demoText, _LOG_LINE ); if((status & 0x04)/4 != 0) { mikrobus_logWrite( " - Alarm Active!!!", _LOG_LINE ); Delay_1sec(); rtc8_writeByte(_RTC8_REG_STATUS, _RTC8_STATUS_REG_CLEAR); // Reset Alarm Flag } else { mikrobus_logWrite( " - No Alarm.", _LOG_LINE ); } mikrobus_logWrite( "----------------------------------", _LOG_LINE ); Delay_ms(1000); } The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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
The RTC 8 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
Software Support
We provide a library for the RTC 8 Click Board™ 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 initializes and defines the I2C drivers and drivers that offer a choice of writing data in register and reading data from the register in BCD and DEC format. The library includes function for sets Time, Date, new Alarm and set/get UNIX time. The user can set and read Time and Date data, especially using the functions for reading and writing data. The library includes functions for setting the desired alarm, disabling alarm and checking whether an alarm has been activated.
Key Functions
uint8_t rtc8_readData(uint8_t reg)
- Read one byte data from register in DEC format.uint32_t rtc8_getUNIX()
- Get current UNIX time.uint8_t rtc8_setTime(uint8_t _hours, uint8_t _minutes, uint8_t _seconds)
- Set new start time - 24 hour format.uint8_t rtc8_setDate(uint8_t _date, uint8_t _month, uint8_t _year)
- Set new start date.
Example Description
The application is composed of the three sections :
- System Initialization - Initializes I2C module and sets INT pin as INPUT and CS pin as OUTPUT.
- Application Initialization - Initialization driver init, settings RTC for work and sets start time/date and new alarm.
- Application Task - Read current Time, Date and UNIX time and checks if the alarm is active.
Note: Comment the lines for setting date and time if you would like the module to keep counting time after a reset or shut down.
void applicationTask() { uint8_t seconds; uint8_t minutes; uint8_t hours; uint8_t _weekday; uint8_t date; uint8_t month; uint8_t year; uint8_t status; uint32_t UNIX_time; char demoText[50]; // Time seconds = rtc8_readData(_RTC8_REG_SECONDS); minutes = rtc8_readData(_RTC8_REG_MINUTES); hours = rtc8_readData(_RTC8_REG_HOURS); // Date _weekday = rtc8_readData(_RTC8_REG_WEEKDAY); date = rtc8_readData(_RTC8_REG_DATE); month = rtc8_readData(_RTC8_REG_MONTH); year = rtc8_readData(_RTC8_REG_YEAR); status = rtc8_readByte(_RTC8_REG_STATUS); // Unix time UNIX_time = rtc8_getUNIX(); mikrobus_logWrite( "Time: ", _LOG_TEXT ); // Houes IntToStr(hours, demoText); Ltrim(demoText); mikrobus_logWrite( demoText, _LOG_TEXT ); // Minute mikrobus_logWrite(":", _LOG_TEXT); IntToStr(minutes, demoText); Ltrim(demoText); mikrobus_logWrite(demoText, _LOG_TEXT); // Seconds mikrobus_logWrite(":", _LOG_TEXT); IntToStr(seconds, demoText); Ltrim(demoText); mikrobus_logWrite(demoText, _LOG_LINE); mikrobus_logWrite( "Weekday: ", _LOG_TEXT ); IntToStr(_weekday, demoText); Ltrim(demoText); mikrobus_logWrite( demoText, _LOG_LINE ); mikrobus_logWrite( "Date: ", _LOG_TEXT ); // Date IntToStr(date, demoText); Ltrim(demoText); mikrobus_logWrite( demoText, _LOG_TEXT ); // Month mikrobus_logWrite(".", _LOG_TEXT); IntToStr(month, demoText); Ltrim(demoText); mikrobus_logWrite(demoText, _LOG_TEXT); // Year mikrobus_logWrite(".", _LOG_TEXT); IntToStr(year, demoText); Ltrim(demoText); mikrobus_logWrite(demoText, _LOG_LINE); mikrobus_logWrite( "UNIX: ", _LOG_TEXT ); LongWordToStr(UNIX_time, demoText); Ltrim(demoText); mikrobus_logWrite( demoText, _LOG_LINE ); if((status & 0x04)/4 != 0) { mikrobus_logWrite( " - Alarm Active!!!", _LOG_LINE ); Delay_1sec(); rtc8_writeByte(_RTC8_REG_STATUS, _RTC8_STATUS_REG_CLEAR); // Reset Alarm Flag } else { mikrobus_logWrite( " - No Alarm.", _LOG_LINE ); } mikrobus_logWrite( "----------------------------------", _LOG_LINE ); Delay_ms(1000); } The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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
The RTC 8 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.
RTC 8 Click-Platine
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.