Some time geeks (should I say Time Lords) checked out my clocks.
Seems they are impressed, saying sub microsecond.
I have spent all day trying to improve on that, and I think I have.
The issues are several - the PPS interrupt that captures the time signal works well, but can randomly have extra latency. The original signal can have jitter, drift, and ever sawtooth (actually have not seen this).
What I did not realise is that there is also noticeable clock drift on the processor, probably temperature related.
I previously assumed clean "on the second" PPS. I have changed it so that is used as a reference on longer term (moving average 5 mins) for frequency, and shorter term phase offset tweaks.
This means my per second reference CPU cycle counts change by 1 at a time as things change, the main change being clock frequency drift. This result is reference ticks varying by 4ns or less.
I need to get the Time Lords to check my latest code and see what they find.
May I suggest another time-related project for you to contemplate in your copious free time?
ReplyDeleteA radio-controlled clock. Specifically.a clock which is set by low frequency radio time signals (in the UK, MSF. Second choice, DCF for Europe. And to make it universal, WWVB in USA, and JJY in Japan. There are others)
I'd do it myself, but it has been many years since I even contemplated programming such a thing, and I was never very good, anyway.
Geoff
Is suspect GPS is by far simpler in so many ways.
Delete