Digi clock with gps time updating

07-Jul-2019 17:57 by 3 Comments

Digi clock with gps time updating

But if all you want to do is display time for humans, you probably would be satisfied with 4 orders of magnitude less precision, which is what this design achieves - 125 µs accuracy (with v5 hardware) with 100 ms granularity.Over the course of the project, the clock has undergone a number of design revisions.

digi clock with gps time updating-17digi clock with gps time updating-54digi clock with gps time updating-35

Even at a 1 MHz counting rate, it takes more than an hour to overflow a 32 bit counter, and that gives us microsecond measurement granularity.The chip has a bunch of registers inside that allow the display to be fully configured and even dimmed.The chip has a resistor that's used to configure the chip for constant-current for each LED segment to insure correct brightness.The serial codes aren't precise enough to do more than name the current second. So the serial data needs to have a second added to it, and the result is stored in a buffer in RAM.The PPS interrupt transfers that buffer to the display chip.For tenths of a second, a timer in the controller is used for interpolation.

The correct counting rate is determined by counting how many timer ticks occur between adjacent PPS interrupts and dividing that by 10.

Easily clock in or clock out via your mobile phone.

Even track the location of your employees clock in and clock out events to ensure they are on-site with GPS tracking.

This project is going to use 7 of them (6 large and 1 small for the 10th of a second digit), plus two LEDs for AM and PM, 4 for two colons between the 3 large groups, and a FIX LED from the GPS module.

There are also two pushbuttons for parameter setting (timezone, DST config and display brightness).

The RC oscillator's short term stability should be good enough for the purpose, and its stability beyond 2 seconds is mooted by the way it's being used. It requires a chip select line to be driven low and then 16 bits of data is clocked in.