[time-nuts] Switching oscillators

Hal Murray hmurray at megapathdsl.net
Sun Dec 9 23:49:04 UTC 2012


lists at rtty.us said:
> 1) Convert them both to logic levels and use a gate.
> 2) Use a relay. 
> Both would need some sort of timer to drive them. Both would disrupt the
> instrument when the switch took place. I know of no "cheap / easy" ways to
> take care of the switching glitch. There are fancy / expensive ways. 

Switching clocks is really hard if they are driving digital logic that you 
want to keep working correctly.  You have to avoid runt pulses.  Is that what 
you mean by "switching glitch"?

It's easy(er) if the clocks are synchronous.

Xilinx had blocks that could switch clocks in some of their FPGAs.  I'm 
pretty sure I've seen the circuit, probably in an app note.  I think the idea 
is roughly like this:
  You need 2 FFs: Running on A and running on B.
Assume you are running on A and the control signal says switch to B.
You use the A clock to turn off the running on A FF.
When B sees that A is off, it can turn on the running on B FF.
Don't forget metastability.

I don't know what to do if the clock you are running on is broken so it can't 
turn off its running-on-Me FF.  You could have a timer running on the other 
clock...  But how long to wait?  There is a chance of a runt pulse if the 
clock starts up at the wrong time.  That's probably not a problem in real 
life, but it's the sort of thing that really complicates designs.  You have 
to keep checking to make sure it's not a problem and you have to remember to 
check.




-- 
These are my opinions.  I hate spam.






More information about the time-nuts mailing list