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]
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]
What does mean digital clock and calendar? Do you mean that nRF51422 RTC behaves as DS1307 or PCF8563?
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. =)
i have the same question. but i must create pulse to drive the micro motor to run to simulate second/minute/hour...
to drive the micro motor, it will use the (0.9/1 + 0.4/0)* 3ms pulse with T=15.625ms and run one step. can i use RTC or i must use TIMER of 16Mhz..??