- #1
TechSpec
- 19
- 0
GPS modules produce a very accurate 1 second timebase signal, rms differency of about 20nS. How do you suggest of using that to split it into a 1000 pieces = 1000Hz = 1000ms ?
My idea is to make a generator with a quartz chrystal and drive it into a counter module, carefully selected divide count would produce 1000kHz signal. And after a 1000 pulses(1000ms), the timebase signal will reset the counter into zero and the counting starts over. On counter there should not be a drift no more than 1 mS in a second, otherways we will miss one millisecond. And drifts less than 1ms/s is not inportant as its being calibrated away on every second. This 1000Hz signal is led to a microcontroller.
Second idea is to use a microcontroller to make the counting. uP's are very precise on shorter timings, but they tend to have drift on longer periods. GPS timebase signal could be used to calibrate the software to run precisely on time by giving a correction pulse on every second. So it would go like this:
uP will start counting only when it gets the timebase signal edge from the GPS. When uP reaches the count 1000, it will start to wait another pulse from the GPS and so on.
However, if the GPS is blocked someway what should i do then?, counter should not stop in any circumstances and it should not miss any time.
Should i run two timing clocks, other is driven by GPS and other one is driven by internal timings of uP. If GPS fails, the internal timing is valid, and the GPS clock is rejected. If GPS comes online again in some point, uP clock is copied to GPS clock to have the same time and we start of using GPS time again. Even that the uP timing is less accurate on longer periods than GPS, it still is better to have less accurate time than no time at all.
TechSpec
My idea is to make a generator with a quartz chrystal and drive it into a counter module, carefully selected divide count would produce 1000kHz signal. And after a 1000 pulses(1000ms), the timebase signal will reset the counter into zero and the counting starts over. On counter there should not be a drift no more than 1 mS in a second, otherways we will miss one millisecond. And drifts less than 1ms/s is not inportant as its being calibrated away on every second. This 1000Hz signal is led to a microcontroller.
Second idea is to use a microcontroller to make the counting. uP's are very precise on shorter timings, but they tend to have drift on longer periods. GPS timebase signal could be used to calibrate the software to run precisely on time by giving a correction pulse on every second. So it would go like this:
uP will start counting only when it gets the timebase signal edge from the GPS. When uP reaches the count 1000, it will start to wait another pulse from the GPS and so on.
However, if the GPS is blocked someway what should i do then?, counter should not stop in any circumstances and it should not miss any time.
Should i run two timing clocks, other is driven by GPS and other one is driven by internal timings of uP. If GPS fails, the internal timing is valid, and the GPS clock is rejected. If GPS comes online again in some point, uP clock is copied to GPS clock to have the same time and we start of using GPS time again. Even that the uP timing is less accurate on longer periods than GPS, it still is better to have less accurate time than no time at all.
TechSpec
Last edited: