[time-nuts] 1PPS to 32.768 khz

Hal Murray hmurray at megapathdsl.net
Wed Oct 19 01:59:42 EDT 2016

> 1. Does anyone know of a device that will take a 1PPS GPS timing signal and
> generate a 32.768 kHz sine wave output ? I have big digital clock that uses
> an 8 bit micro processor and an external 32.768 crystal. Obviously the
> external crystal is awful for accuracy. 

I don't know of any off-the-shelf device that does that.

Have you looked at the micro?  Is there a spare input pin for the PPS?  Could 
you rewrite the software to use the PPS rather than counting to 32K?

If you get a GPSDO with a 10 MHz output, then you could do it in software.  
I'm a bit surprised that tvb doesn't already have one as an option for his 

If you think (analog) hardware is more fun than software, you could build a 
PLL.  I'm not a PLL wizard.  My guess is that 32K:1 is too big a step.  I'd 
probably try 2 steps of 256:1 and 128:1.

If you like software, you can do the PLL in software.  (Less hardware than 
the analog version.)  The idea is to run a tiny CPU at some handy frequency, 
measure that clock using the PPS, and figure out how many cycles you need for 
each half cycle at 32K Hz.  You don't need each (half) cycle to be super 
accurate, but the long term has to be right.  If you knew the clock frequency 
and it was stable, the cycles-per-tick would turn into the same sort of math 
at Bresenham's algorithm gets for drawing diagonal lines:  some steps are N 
cycles, some are N+1.  I'll bet the code is nice and clean after you figure 
out how to do it.  Maybe it's just a PLL in software.

These are my opinions.  I hate spam.

More information about the time-nuts mailing list