PDA

View Full Version : timer offset calibration for RTC



longpole001
- 15th December 2014, 02:01
hi guys been looking a the spec sheet on a new RTC that has a offset calibration method but i am not sure how it may be done in code as yet , any pointers



7519

richard
- 15th December 2014, 02:27
do you have a freq/period counter that can measure 0.1 nS accurately ?

what is the temperature stability of your xtal ?
what is the long term stability of your xtal ?

longpole001
- 15th December 2014, 06:43
xtl is 10ppm type , on the rtc , but any measurements would be by putting the clock output pin from the RTC chip into the pic and counting / and doing the calculation to adj the offset value on the rtc , the pic is 18f 64mhz,

richard
- 15th December 2014, 07:47
unless the xtal on the pic is sufficiently more stable and accurate than the rtc rock its hard to see a meaningful result quickly .have seen clever things done with a gps and the 1 sec pulse the satellite
atomic clock sends out. (described in silicon chip mag , I think it even used a pic chip).
it would probably achieve more to see if you rtc gains or loses time compared to a ntp clock over a period of days (weeks?) and add or subtract 1 (as appropriate) to the adjustment buffer ,then re-evaluate. but in perth weather the temperature difference between inside and outside (hopefully) would probably make calibration doubtful anyway