TOP Contributors

  1. MIKROE (2751 codes)
  2. Alcides Ramos (372 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139050 times)
  2. FAT32 Library (71588 times)
  3. Network Ethernet Library (56988 times)
  4. USB Device Library (47326 times)
  5. Network WiFi Library (43005 times)
  6. FT800 Library (42295 times)
  7. GSM click (29754 times)
  8. mikroSDK (27873 times)
  9. PID Library (26858 times)
  10. microSD click (26129 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

RTC 11 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.14

mikroSDK Library: 2.0.0.0

Category: RTC

Downloaded: 159 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.

No Abuse Reported

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".

  • mikroSDK Library 1.0.0.0
  • Comments (0)

mikroSDK Library Blog


RTC 11 Click

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.

rtc11_click.png

Click Product page


Click library

  • Author : Stefan Ilic
  • Date : Jul 2021.
  • Type : SPI type

Software Support

We provide a library for the RTC11 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for RTC11 Click driver.

Standard key functions :

  • rtc11_cfg_setup Config Object Initialization function.

    void rtc11_cfg_setup ( rtc11_cfg_t *cfg );
  • rtc11_init Initialization function.

    err_t rtc11_init ( rtc11_t *ctx, rtc11_cfg_t *cfg );

Example key functions :

  • rtc11_set_time Set time hours, minutes and seconds function

    err_t rtc11_set_time ( rtc11_t *ctx, rtc11_time_t rtc_time );
  • rtc11_get_time Get time hours, minutes and seconds function

    void rtc11_get_time ( rtc11_t *ctx, rtc11_time_t *rtc_time );
  • rtc11_set_date Set date day of the week, day, month and year function

    err_t rtc11_set_date ( rtc11_t *ctx, rtc11_date_t rtc_date );

Example Description

This is an example that demonstrates the use of the RTC 11 Click board.

The demo application is composed of two sections :

Application Init

Initalizes SPI, performs software reset, sets system time and date, and starts clocking system.


void application_init ( void ) {
    log_cfg_t log_cfg;  /**< Logger config object. */
    rtc11_cfg_t rtc11_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.

    rtc11_cfg_setup( &rtc11_cfg );
    RTC11_MAP_MIKROBUS( rtc11_cfg, MIKROBUS_1 );
    err_t init_flag  = rtc11_init( &rtc11, &rtc11_cfg );
    if ( SPI_MASTER_ERROR == init_flag ) {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }
    log_printf( &logger,"------------------------\r\n" );
    log_printf( &logger," Software reset \r\n" );
    rtc11_soft_rst( &rtc11 );
    Delay_ms ( 100 );

    time.hours = 23;
    time.min = 59;
    time.sec = 55;
    log_printf( &logger,"------------------------\r\n" );
    log_printf( &logger," Setting time: %.2d:%.2d:%.2d \r\n", ( uint16_t ) time.hours, ( uint16_t ) time.min, ( uint16_t ) time.sec );
    rtc11_set_time ( &rtc11, time );
    Delay_ms ( 100 );

    date.day_of_week = 0;
    date.day = 19;
    date.month = 7;
    date.year = 21;
    log_printf( &logger,"------------------------\r\n" );
    log_printf( &logger," Setting date: %.2d/%.2d/%.2d \r\n", ( uint16_t ) date.day, ( uint16_t ) date.month, ( uint16_t ) date.year );
    rtc11_set_date( &rtc11, date );
    Delay_ms ( 100 );

    rtc11_stp_sys_slk ( &rtc11, RTC11_PROP_DIS );
    log_info( &logger, " Application Task " );
    log_printf( &logger,"------------------------\r\n" );
}

Application Task

Demonstrates use of RTC 11 Click board by reading and displaying time and date via USART terminal.


void application_task ( void ) {
    rtc11_get_time ( &rtc11, &time );
    Delay_ms ( 10 );
    rtc11_get_date ( &rtc11, &date );
    Delay_ms ( 10 );

    if ( sec_flag != time.sec ) {
        log_printf( &logger, " Date: " );
        disp_day_of_the_week( date.day_of_week );
        log_printf( &logger, " %.2d/%.2d/20%.2d \r\n", ( uint16_t ) date.day, ( uint16_t ) date.month, ( uint16_t ) date.year );
        log_printf( &logger, " Time: %.2d:%.2d:%.2d \r\n", ( uint16_t ) time.hours, ( uint16_t ) time.min, ( uint16_t ) time.sec );
        log_printf( &logger,"--------------------------\r\n" );
    }
    sec_flag = time.sec;
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.RTC11

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.


ALSO FROM THIS AUTHOR

Nano Power click

5

Nano Power click is a boost (step-up) DC-DC converter click with extremely high efficiency and very low input voltage, aimed at the low power IoT market and battery-powered sensors and other devices.

[Learn More]

nvSRAM click

5

nvSRAM Click is a compact add-on board that contains the most reliable nonvolatile memory. This board features the CY14B101J, a 1-Mbit nvSRAM organized as 128K words of 8 bits each with a nonvolatile element in each memory cell from Cypress Semiconductor.

[Learn More]

Thermo 26 Click

0

Thermo 26 Click is a compact add-on board that accurately measures temperature. This board features the STS31-DIS, a high-accuracy digital temperature sensor from Sensirion. Characterized by its high accuracy (up to ±0.2°C typical) and high resolution of 0.01°C, the STS31-DIS provides temperature data to the host controller with a configurable I2C interface. It relies on the industry-proven CMOSens® technology, providing increased intelligence, reliability, and improved accuracy specifications, including enhanced signal processing, user-selectable I2C addresses, and up to 1 MHz communication speeds.

[Learn More]