[time-nuts] GPSDO with all-digital phase/time measurement?
hmurray at megapathdsl.net
Thu Feb 27 03:00:14 EST 2014
haunma at keteu.org said:
> That being said, I find myself wondering as follows: Suppose that we count
> OCXO cycles (at, say, 10 MHz) using one of the MCU's timer/counter
> peripherals, and periodically sample the counter value with an interrupt
> triggered on the rising edge of the GPS 1pps. Assume that this interrupt is
> the highest priority in the system, so that our measurement is fully
> deterministic, having only the +/- one cycle ambiguity inherent in the
> counting. Also assume that we keep the counter running continuously.
In general, things like "highest priority interrupt" don't guarantee what you
want. The fine print depends upon your MCU. Some instructions take more
than 1 cycle. Consider what happens if your interrupt arrives just after
another interrupt got started.
For this problem, I'd check the fine print on the counter/timers. They often
have a mode where it will copy the counter to a holding register (and
generate an interrupt) on the rising edge of an input pin. If you also get
an interrupt on the counter overflowing, you can work out the total number of
cycles between rising edges.
The other problem you need to be aware of if you want to build a GPSDO is
tvb: Motorola GPS M12+ Sawtooth
Tom Clark and Rick Hambly: Timing for VLBI
These are my opinions. I hate spam.
More information about the time-nuts