Just for fun, I wrote a program that uses any cheap GPS with a PPS output as the timing source for the Apollo3's build-in XTAL calibration mechanism. It works great! It means that you don't have to go buy a frequency counter to calibrate your boards to within the 1 PPM promised by the calibration mechanism.
Here is the output from a sample test run:
Code: Select all
The XTAL frequency is measured at 32768.829 Hz
Frequency error is -25.31 PPM
Frequency adjustment value is -26.54 steps
Closest integer step count is -27 steps
The first pic shows that the frequency counter agrees with the GPS about the length of a second to 0.1PPM. The second pic shows the calibrated 16384 Hz clock output from a test Redboard after the calibration completes. The uncalibrated error was 25.31 PPM, and after calibration, it is off by -0.67 PPM. That's as good as the Apollo3 calibration mechanism can do!
I'll figure out how to post the code at some point.
You do not have the required permissions to view the files attached to this post.