[email protected] 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 hanging bridges. tvb: Motorola GPS M12+ Sawtooth http://www.leapsecond.com/pages/m12/sawtooth.htm Tom Clark and Rick Hambly: Timing for VLBI http://gpstime.com/files/tow-time2009.pdf -- These are my opinions. I hate spam. _______________________________________________ time-nuts mailing list -- [email protected] To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.
