I use 8051's RTC timer in order to keep track of current time.
Every time the timer expires, I increment a variable tick by 1, and when tick equals NUMBER_OF_TICKS_IN_SECOND I increment current time by 1 second (and clears tick).
My problem is finding the exact value of NUMBER_OF_TICKS_IN_SECOND for the time ticking to be accurate.
Currently, I have an error of 3 minutes every 10 hours.
Is there any efficient to find the correct value?
Moreover, are there any tips for reaching high accuracy of time ticking?
For example, currently some of the timers constantly operate and some of them sometimes operate and sometimes not.
Is it bad for time accuracy that the system doesnt operate always at the same level, with respect to timers?
Every time the timer expires, I increment a variable tick by 1, and when tick equals NUMBER_OF_TICKS_IN_SECOND I increment current time by 1 second (and clears tick).
My problem is finding the exact value of NUMBER_OF_TICKS_IN_SECOND for the time ticking to be accurate.
Currently, I have an error of 3 minutes every 10 hours.
Is there any efficient to find the correct value?
Moreover, are there any tips for reaching high accuracy of time ticking?
For example, currently some of the timers constantly operate and some of them sometimes operate and sometimes not.
Is it bad for time accuracy that the system doesnt operate always at the same level, with respect to timers?
Last edited: