Re: Did anybody know an "easy" way to generate/keep a clock from GPS signals ?
What i had in mind was to lock the clock to the GPS.
I'm planning to do the following :
1 - Get a tunable crystal clock and wire its tune pin to an DAC pin of the microcontroller.
2 - Use a prescaler to count the clock pulses (Wire it to a microcontroller pin, triggering an interrupt).
3 - Get the PPS (Pulse-per-second) output of the GPS receiver and wire it to a pin of the microcontroller (Triggering an interrupt).
4 - When a PPS trigger happens, check the difference to the value counted from the clock (IE, if at X MHz the counting would have gone to X Million pulses per second, the actual counting value is the drift).
5 - Alter the DAC value to make the crystal compensate for the drift.
Is this feasible ?