[time-nuts] Clock Correction Algorithm

Miguel Gonçalves mail at miguelgoncalves.com
Thu Nov 24 11:37:34 EST 2011


Hi!

On 24/11/2011, at 15:16, Bob Camp <lists at rtty.us> wrote:

> Hi
> 
> How about simply adding 1 ms every other second? You could then fine tune it by picking a small number of seconds to not add a ms to.
> 

An idea but I am searching for a more global and elegant solution. 

In fact, after reading about PLL (as someone suggested) I noticed that my algorithm is a simple PLL. 

Cheers,
Miguel 


> Bob
> 
> 
> 
> On Nov 24, 2011, at 7:16 AM, Javier Herrero <jherrero at hvsistemas.es> wrote:
> 
>> El 24/11/2011 13:56, Miguel Gonçalves escribió:
>>> 
>>> 
>>> Right! That is what I am doing.
>>> 
>>> The problem is the drift between adjustments. Arduino's clock is slow 25 ms every minute and if temperature changes it will surely be different.
>>> 
>>> 
>> That is more than 400ppm error, that sounds quite high. Is the clock frequency of the Arduino so drifted? I would try first to check (and correct a bit) the source of that error. If the crystal frequency is ok, perhaps there is an error in the programming of the timer that generates the timing interrupt.
>> 
>> Regards,
>> 
>> Javier
>> 
>> 
>> _______________________________________________
>> time-nuts mailing list -- time-nuts at febo.com
>> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
>> and follow the instructions there.
> 
> _______________________________________________
> time-nuts mailing list -- time-nuts at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.




More information about the time-nuts mailing list