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-10-27
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: RTC
Downloaded: 1751 times
Not followed.
License: MIT license
RTC 11 Click is a compact add-on board that contains a real-time clock IC designed to maximize battery life and reduce overall battery requirements in wearable applications. This board features the AB0815, an ultra-low-power coupled with a highly sophisticated feature set the real-time clock from Abracon LLC.
Do you want to subscribe in order to receive notifications regarding "RTC 11 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "RTC 11 click" changes.
Do you want to report abuse regarding "RTC 11 click".
Library Description
The library covers all the necessary functions that enables the usage of the RTC 11 Click board. User can set or read time, date, day of the week, alarm, change settings, or use generic read and write functions.
Key functions:
void rtc11_set_time ( uint8_t t_hrs, uint8_t t_min, uint8_t t_sec );
- Function is used to set system time.void rtc11_get_time ( uint8_t *t_hrs, uint8_t *t_min, uint8_t *t_sec );
- Function is used to get current system time.void rtc11_get_date ( uint8_t *w_day, uint8_t *d_day, uint8_t *d_mon, uint8_t *d_yrs );
- Function is used to get system date.Examples description
The application is composed of three sections :
void application_task ( )
{
rtc11_get_time ( &t_hrs, &t_min, &t_sec );
Delay_ms( 10 );
rtc11_get_date ( &w_day, &d_day, &d_mon, &d_yrs );
Delay_ms( 10 );
if ( sec_flag != t_sec )
{
mikrobus_logWrite( " Time: ", _LOG_TEXT );
ByteToStr( t_hrs, log_txt );
ltrim( log_txt );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( ":", _LOG_TEXT );
ByteToStr( t_min, log_txt );
ltrim( log_txt );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( ":", _LOG_TEXT );
ByteToStr( t_sec, log_txt );
ltrim( log_txt );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( "", _LOG_LINE );
mikrobus_logWrite( " Date: ", _LOG_TEXT );
disp_day_of_the_week( w_day );
mikrobus_logWrite( "/", _LOG_TEXT );
ByteToStr( d_day, log_txt );
ltrim( log_txt );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( "/", _LOG_TEXT );
ByteToStr( d_mon, log_txt );
ltrim( log_txt );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( "/", _LOG_TEXT );
ByteToStr( d_yrs, log_txt );
ltrim( log_txt );
mikrobus_logWrite( "20", _LOG_TEXT );
mikrobus_logWrite( log_txt, _LOG_TEXT );
mikrobus_logWrite( "/", _LOG_TEXT );
mikrobus_logWrite( "", _LOG_LINE );
}
sec_flag = t_sec;
}
Additional Function :
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.