| ??? 04/19/03 13:14 Read: times |
#43765 - RE: Time Accuracy Prob.in RTC /Nagarajan Responding to: ???'s previous message |
The software compensation is easy to implement and without any hardware RTC...
Let imagine you're using a microcontroller's timer to count the seconds. Put a temperature sensor as near as possible of the microcontroller crystal. Look at your crystal datasheet, you will find the curve (frequency shift) = f(temperature). You have to set in you code an array with some values of the shift frequency for different temperature points. Then you've just to add the shift value at a given temperature to the counter used for RTC. It works very well and it has been tested. I can remember that the accuracy was better than 5mn/year. The only disadvantage is that you have to calibrate the temperature sensor at the end of production line. Concerning hardware RTC, it should be possible to do the same, but I've not tested it. Regards Stephane |



