[time-nuts] GPS DO Alternatives

Hal Murray hmurray at megapathdsl.net
Sun Dec 9 23:26:34 UTC 2012


albertson.chris at gmail.com said:
>> I don't think that is going to do what you want.  The problem is what
>> happens if set and reset are on at the same time?

> This would be the best case.  The result will be random and we'd read an
> average value of 0.5 from the flip flop. 

The problem is that FFs don't work that way.

There are two types of FFs.

SR-FFs have set and reset inputs.  Set turns it on.  Reset turns it off.  
These are level sensitive, not edge sensitive.  If both set and reset are 
active at the same time (overlap) you have to look in the data sheet to see 
what happens.  After the overlap, the last one active wins.

Edge triggered D-FFs have data (D) and clock inputs.  If D is high when clock goes high, the output will be high.  If D is low when clock goes high, the output will be low.

There are rules for FFs: Setup, hold, min high/low on the clock, ...  Read the data sheet for the whole list.


> I think you want everything to be edge triggered.  The flip flop should look
> only at the leading edge of each pulse. 

That would be handy, but I don't know of any FFs that work that way.  All of the clocked FFs only have one clock.

You might make it work by using the PPS as the clock with the D input hard wired to 1.  That will set the FF unless the reset is active.


albertson.chris at gmail.com said:
> You don't get a PPS from the OXCO.  It runs at 10MHz (Or whatever you like)
> so it resets the flip flop every 100 nanoseconds. 

> The way this works is the PPS from the GPS sets the FF to "1" once per
> second and then some time later the OXCO resets it back to zero.   If we
> sample the FF at some fixed time after the PPS and that fixed time is less
> then the OXCO period then the FF will be either 1 or 0.   THe computer tries
> to drive the OXCO so that the sampled value is 0.5 on average.   So it looks
> at the last 1000 samples and tries to hit "500". 

How are you going to implement that fixed time delay and sampling?  I don't see a simple way to do it.

What is the correct delay?  How about 0?

In general, when people start adding things like "fixed delays", I start thinking "kludge - there must be a better way".

------------

There is another problem with using the OCXO output (100 ns) directly.  How do you eliminate aliasing/beats?  Suppose the OCXO is running at exactly 9 MHz.  If you average over 1000 samples, you'll get your 0.500 .  If you look carefully, you can find a pattern.

There is probably some simple math in here, but I'm not enough of a PLL wizard to be able to describe it.  Capture range and things like that.



-- 
These are my opinions.  I hate spam.






More information about the time-nuts mailing list