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: 2019-03-20
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: RTC
Downloaded: 4497 times
Followed by: 1 user
License: MIT license
RTC4 click has an integrated backup energy source that maintains a charge with an onboard coin cell supercapacitor. Being a 1-Wire click board, RTC4 click can operate in a microLAN network (a network of 1-Wire devices that are all associated with a master device).
Do you want to subscribe in order to receive notifications regarding "RTC 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "RTC 4 click" changes.
Do you want to report abuse regarding "RTC 4 click".
Front and back view of the RTC4 Click board designed in mikroBUS form factor.
View full imageLibrary Description
The library covers all the necessary functions to control the RTC 4 click board. Library performs the communication with the device via 1-Wire protocol by writing to registers and by reading from registers. A library has the function for reading sensor registration number: family code, serial number & CRC tester data, for a set and get Unix time data and for convert Unix time and date to human-readable format.
Key functions:
Examples description
The application is composed of three sections:
void applicationTask() { rtc4_getUnixTime(); rtc4_convertDateTime(); if ( timeSecondsNew != timeSeconds ) { mikrobus_logWrite( " Time: ", _LOG_TEXT ); rtc4_displayLogUart( timeHours ); mikrobus_logWrite( ":", _LOG_TEXT ); rtc4_displayLogUart( timeMinutes ); mikrobus_logWrite( ":", _LOG_TEXT ); rtc4_displayLogUart( timeSeconds ); mikrobus_logWrite( "", _LOG_LINE ); mikrobus_logWrite( " Date: ", _LOG_TEXT ); rtc4_displayLogUart( dateDay ); mikrobus_logWrite( ".", _LOG_TEXT ); rtc4_displayLogUart( dateMonth ); mikrobus_logWrite( ".", _LOG_TEXT ); mikrobus_logWrite( "20", _LOG_TEXT ); rtc4_displayLogUart( dateYear ); mikrobus_logWrite( ".", _LOG_LINE );​ mikrobus_logWrite( "-------------------", _LOG_LINE ); timeSecondsNew = timeSeconds;​ } }
Additional Functions :
Other mikroE Libraries used in the example:
One_Wire
UART​
Conversion
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