We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-07-23
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: RTC
Downloaded: 2093 times
Not followed.
License: MIT license
RTC 9 Click is a real-time clock module which has an extremely low power consumption, allowing it to be used with a single button cell battery, for an extended period of time. This board features the M41T82, real-time clock (RTC) with battery switchover, from ST Microelectronics.
Do you want to subscribe in order to receive notifications regarding "RTC 9 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "RTC 9 click" changes.
Do you want to report abuse regarding "RTC 9 click".
Library Description
The library contains basic functions for working with RTC 9 click. The user is enabled to adjust and read the time and date. it also has the ability to set alarms.
Key functions:
void rtc9_set_time( uint8_t hour, uint8_t min, uint8_t sec )
- Set new time - 24 hour format.void rtc9_set_date ( uint8_t day, uint8_t day_of_week, uint8_t month, uint8_t year )
- Set new date.void rtc9_wakeup ( void )
- Wake-up process.Examples description
The application is composed of three sections :
void application_init ( )
{
rtc9_i2c_driver_init
(
( rtc9_obj_t )&_MIKROBUS1_GPIO,
( rtc9_obj_t )&_MIKROBUS1_I2C,
RTC9_SLAVE_ADDRESS
);
Delay_ms( 500 );
rtc9_wakeup( );
rtc9_set_time( 12, 15, 45 );
rtc9_set_date ( 20, RTC9_DAY_FRIDAY, RTC9_MONTH_MARCH, 20 );
}
void application_task ( )
{
time_process( );
date_process( );
mikrobus_logWrite( "----------------------------------------", _LOG_LINE );
Delay_ms( 1000 );
}
Additional Functions :
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.