[time-nuts] GPSDO Alternatives

David davidwhess at gmail.com
Thu Dec 6 23:59:43 UTC 2012


You can use the ATmega328 16 bit timer/counter in input capture mode
to count the number of 10 MHz OCXO cycles per pulse per second period
to a resolution of 100ns but there are some problems:

The ATmega328 16 bit timer/counter external clock is limited to 1/4 of
the CPU frequency with an asynchronous source so the 10 MHz OCXO would
need to be divided down which would further limit performance and
require an external divider.  Modifying the Aruino board to use the 10
MHz OCXO in place of the CPU clock solves that problem.

Then operating the counter/timer in input capture mode with the GPS
pulse per second signal connected to the input capture pin would allow
almost Shera like performance.  The timing resolution would be 2.4
times lower (and not asynchronous) limiting performance over short
time spans.

On Thu, 6 Dec 2012 14:57:19 -0800, Chris Albertson
<albertson.chris at gmail.com> wrote:

>You'd have to seriously divide down the output from the 10MHz OCXO if you
>were going to use it as an interrupt.  Maybe to divide by 10,000? and even
>at the higher clock rate you'd still have poor resolution.
>
>I image each interrupt handler would sample some internal counter and the
>background task would look at the delta between the two and adjust the DAC
>to drive the OCXO to close the difference.   The resolution would be
>(maybe?) a "handful" of clock cycles.   Given enough time, say a 1000
>second period it might wrk well enough.  I can't know without doing a more
>detailed design
>
>
>On Thu, Dec 6, 2012 at 1:59 AM, Don Latham <djl at montana.com> wrote:
>
>> Chris:
>>
>> > The question I have again is about a simple phase detector.
>>
>> I did ask if the arduino interrupt ports could be used as a phase
>> detector; one on the GPS and one on the OXCO. Too much jitter? If the 12
>> MHz clock is too slow, would an 80 MHz clock ARM arduino style processor
>> work? I'm simply too new at this to decide.
>>
>> Don



More information about the time-nuts mailing list