This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I want to implement digital clock AND CALENDER in nRF51422 using internal RTC

I want to implement digital clock AND CALENDER in nRF51422 using internal RTC. iF ANYONE HAVE ANY IDEA THEN PLEASE SHARE WITH ME. [email protected]

Parents
  • How about using app_timer and time.h functions?

    First you can create a timer of which the period is 1000 ms. And increase global rtc counter (e.g. uint32_t rtc_counter) in the timer callback each one second. Then you can convert its format to struct tm with localtime(). You can also set rtc counter to the variable using mktime().

    Of cource, rtc counter will reset if device is off and you have to set rtc counter again. =)

Reply
  • How about using app_timer and time.h functions?

    First you can create a timer of which the period is 1000 ms. And increase global rtc counter (e.g. uint32_t rtc_counter) in the timer callback each one second. Then you can convert its format to struct tm with localtime(). You can also set rtc counter to the variable using mktime().

    Of cource, rtc counter will reset if device is off and you have to set rtc counter again. =)

Children
Related