rtc implementation

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • rtc implementation

    Hi All,
    I have to implement day time (hour,min,sec). I created timer as OS_CREATETIMER (&TIMER1000,tod_Handler,1000). I think, timeout period is in mill second so callback function get called after every 1000 ms (1sec). Hence, Hour, Minute and Second variables get updates in callback function. These three variables are global variables so that I can use these variables to display time. But problem is, second is not incrementing in 1second( obviously, callback is not executed in 1 sec). I doubt thar unit of OS_TIME is not in milli second. Please anybody tell me how to call callback in exactly 1 sec.
    Please, also, suggest me other efficient method for implementing RTC. It would be really appreciable.

    The post was edited 1 time, last by techharsh ().