[time-nuts] ACAM GP22 Chip

Hal Murray hmurray at megapathdsl.net
Wed Nov 25 15:35:44 EST 2015

th.allgeier at gmail.com said:
> Absolute accuracy is not the problem here, unless the 32768 Hz clock on the
> eval board actually drifts. ...

It will drift with temperature.  Not much, but this is time-nuts.  Coax or 
R-C delay lines will probably drift more.

If you poke around on the web you can probably find a graph of frequency vs 
temperature, maybe even for that particular vendor/model of crystal if you 
can read the label.  Beware: the graph for a 32 KHz crystal is probably much 
different than a high frequency (10 MHz) crystal.

The question is how much does it drift and/or is that significant relative to 
other sources of drift.  Probably not.  When you get things working, try 
hitting the crystal with a heat gun or cold spray and see if you can see any 

You may be able to see it on a scope if you trigger on one edge, use the 
delayed sweep to look at the next cycle (or several cycles out) and then zoom 
way in.


The really really simple approach is to get a signal generator that will do 
it all.  I don't have a model number to suggest, but some of them have two 
knobs, one for the frequency of the basic signal and another for the delay 
from the basic signal to a secondary signal.


[delay line suggestion]

> Thanks for the suggestions - these sound a bit beyond my current level of
> skills and kit.

If you want long delays, it's often easier to do it with digital logic rather 
than analog.  (I'm embarrassed that I didn't think of it.)

Assume you have a 10 MHz clock and you want to delay 10 microseconds, that's 
100 cycles.  With faster clocks you have to delay more cycles.  ...

The really simple case is to delay by one cycle.  That's just another 
flip-flop.  Assuming that your signal is in one FF, take that signal as input 
to another FF.  The output of that second FF will be the first FF delayed by 
one clock.  If you have a signal generator you can use it for the clock.  
Adjusting the frequency will change the delay.

To delay a few cycles, you can use a shift register.  That's just shorthand 
for a collection of FFs all wired up in a chain.  They come 8 bits to a DIP 
package.  Look at the data sheet for a HC299.

For longer delays, you want a counter.  The simple approach is to pick your 
count to be a power of two.  If it counts every cycle, the carry out will 
tick every 2-power-of-N cycles where N is the number of bits in the chip.  
You can get counter chips with a load option.  That's an easy way to adjust 
the delay.  Assume you have an 8 bit counter.  If you load it with 0, it will 
take 255 cycles to get a carry out.  If you load it with 155, it will only 
take 100 cycles.

For really long delays, move to software.  An Arduino is probably the right 
approach for something like this.  The basic idea is to turn on one output 
pin, wait a while, then turn on another pin.  The wait-a-while is just a loop 
that does nothing for the right number of iterations.  If you need fine 
control, you probably need to use assembly language and count each cycle.  If 
you can live with rough answers (20.3 microseconds rather than 20), then you 
can probably do it with C and the standard Arduino software package.

These are my opinions.  I hate spam.

More information about the time-nuts mailing list