Author Topic: Is there a simple trick to get integer multiples of oscillator frequencies?  (Read 5132 times)

0 Members and 1 Guest are viewing this topic.

Offline magetooTopic starter

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: se
So here's something that's been rattling about in my head lately.  Not terribly important, but I wonder how people who know what they are doing would solve this.

I have this idea of running a certain old sound chip at a nonstandard frequency in order to hopefully get it to play nicely with modern parts and audio rates; this nonstandard frequency is a little odd, but happens to be exactly three times a common value for crystals for UARTS/baud rate generation.  So that got me thinking, how would one go about multiplying a clock frequency by three?

Clock / frequency generation is not something I've really had to think about much so far.  Lately I've been reading up on PLLs, but 3:1 is so close that it seems there might be a simpler way; this won't need gigahertz or tunability or some oddball 42:pi ratio.


Spoiler: What I'm looking for is 13.824 MHz, and parts for that frequency do seem to exist.  I'm still curious to hear if there's a junk box solution to this sort of thing that's obvious to everyone but me.  (Getting higher harmonics out of the crystal maybe?)
 

Offline Andy Watson

  • Super Contributor
  • ***
  • Posts: 2117
Tank circuits!
Make an L-C circuit resonant at the frequency you desire. Excite with lower frequency and use a couple of gates to square-up the output again. Essentially, you are making a band-pass filter to select-out the harmonics of the original clock. It helps if the original clock is not sinusoidal (you need the harmonic content).
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
if you can get a crystal, rather than an oscillator, design the oscillator circuit to run on the third harmonic of the crystal. That does mean you'll need a transistor and an LC tuned circuit but its far easier than a multiplier.

Tac Eht Xilef

  • Guest
Google "harmonic oscillator". The basic idea is use the crystal for a square wave oscillator at its fundamental frequency, then add a narrow bandpass fiter for the 3rd harmonic. Throw in something to square it up, and you've got a clock.

Myself, I keep a couple of LTC690* silicon oscillators handy for less critical applications like yours. Cheaper & easier :)
 

Offline magetooTopic starter

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: se
That was pretty quick, thanks for the replies!

The basic idea is use the crystal for a square wave oscillator at its fundamental frequency, then add a narrow bandpass fiter for the 3rd harmonic.
slaps forehead

That's really quite obvious, now that you (both) mention it.  Why didn't I think of that right away?

And I'm guessing that if one can leave the crystal out of the loop and get a nice square wave in, then the filter doesn't have to be amazingly narrow and sharp either, as long as it rejects f and 5f well enough.  Hmm.

Quote
Myself, I keep a couple of LTC690* silicon oscillators handy for less critical applications like yours. Cheaper & easier :)

How dare you call my digitally pristine 48kHz audio "less critical".  :-)

Neat chips!  I'll have to remember those for next time I order something.


if you can get a crystal, rather than an oscillator, design the oscillator circuit to run on the third harmonic of the crystal.

See, that's the kind of thing that is obvious to people who actually know what they are doing, but completely above my head.

I guess you'd go about it the same as a circuit for oscillating at the fundamental frequency, and then tune "everything else" (that isn't the crystal) for the harmonic you are interested in?  Or does one need to suppress the fundamental somehow too?

Guess I've got some reading to do.
« Last Edit: July 24, 2014, 11:25:43 am by magetoo »
 


Offline vk6zgo

  • Super Contributor
  • ***
  • Posts: 7699
  • Country: au
Actually,the frequency it will oscillate at is an "overtone" which is usually very close to,but not exactly the same as a harmonic of the fundamental.

Google for "Overtone Oscillator".
 

Offline nitro2k01

  • Frequent Contributor
  • **
  • Posts: 845
  • Country: se
Out of curiosity, which sound chip? 10+ MHz is far too high for SID. Is it YMF262 or one of the other OPL chips maybe?
Whoa! How the hell did Dave know that Bob is my uncle? Amazing!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22382
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
If you're still curious, there are a few ways:

The most old-fashioned is an injection locked oscillator.  The oscillator is typically a blocking oscillator or relaxation oscillator type, which has a voltage or current that charges slowly, until approaching, and then crossing a threshold.  When that happens, it fires a pulse and resets the cycle.  If a small perturbation is added to the 'charge' signal, or subtracted from the threshold -- same thing, then when that perturbation is high (near a peak), the oscillator is more likely to reset early, and in phase with that signal.  Depending on the unperturbed frequency, and the magnitude of perturbation, many oddball ratios can be had, normally something like a ratio of p/q with p+q < 10 or so.  They can be chained to get very large ratios, of course.

A few examples are: to generate TV scan lines (NTSC TV is 525 lines per frame, interlaced alternate fields; meaning, at the field rate of 60Hz, each field is alternately 262 or 263 lines -- a toggle flip-flop would be needed to select which sequence occurs on alternate cycles, or an extra line would be inserted or removed somehow).  The horizontal sync was, in turn, derived from the colorburst frequency (when color came along), with a ratio of... 228?  Another application was in somewhat cheaper organs in the 60s, which typically used tube LC oscillators for the highest octaves, and germanium transistor flip-flops (essentially injection locked astable multivibrators) to generate the lower octaves.  (Between the germanium transistors, Z5U ceramic capacitors, and ambient temperatures produced by the tube power amp, among other things, even this 1:2 ratio apparently wasn't terribly stable!)

Apparently, the technique is still in use today for extremely high frequency prescalers (>30GHz) in frequency counters; at least, I've seen a few research articles on it.  No idea what uses this commercially.

Straight multiplication is easy.  Often used in radio up-converters.  You take a tuned RF amplifier, set it for a particularly nasty bias condition so it generates a lot of distortion, and tune the output for one of those harmonics.  Ratios up to 5:1 are practical, and much larger non-prime numbers are achieved through cascading.  An example might be a reactance modulated FM/PM source: because the phase shift is nominal (within +/-90 degrees), the deviation is very small (fractional percent), so for the FM to be of practical magnitude (+/-10kHz, say), it has to be multiplied significantly.  You might have a crystal oscillator at 1MHz, reactance mod, then multipliers to take that up to, say, the ~500MHz amateur band (576MHz..?), where the deviation is acceptable as "narrow band FM".  (Commercial wide band FM (100kHz deviation) is produced through different means; originally with difficulty, in rather elaborate systems that mechanically servoed the drifty frequency; later, using a fantastic tube called a phasitron; then with varactor control and PLLs; digital synthesis is probably used today.)

Other than that, the canonical digital method is a VCO phase-locked to a reference.  The reference is divided by q with a digital counter, and the VCO output is divided by p with another.  The counter outputs are what the PLL is comparing.  Thus, the VCO runs at p/q times the input.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline magetooTopic starter

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: se
Out of curiosity, which sound chip? 10+ MHz is far too high for SID. Is it YMF262 or one of the other OPL chips maybe?

Yep, YMF262.  The datasheet mentions using a 14.32 MHz clock (incidentally, 3×4.77) which I think was common for ISA bus related things back then.  That gives an audio output rate of 49722 samples/sec.

8 cycles per operator, and 36 operators (18 voices), which is where the factor of 9 (or 3) comes from.  If it had only had 16 voices instead of 18...

I had this idea that maybe one could massage the data stream slightly (seems like a task for a CPLD) and send it to a I2S DAC at 48 kHz instead.

All very theoretical so far, and I'm sure there are all kinds of traps here.
 

Online David Hess

  • Super Contributor
  • ***
  • Posts: 17117
  • Country: us
  • DavidH
If you are working with a discrete crystal, then a third overtone oscillator will be the easiest way.  That just amounts to adding a frequency selective network to suppress the fundamental and other modes.

With an existing clock, injection locking is probably the simplest because it will generate a high output level but I would consider frequency tripling a close second.

In a high performance application, I would phase lock a crystal oscillator to the lower frequency source without using division.  Some test instruments do this allowing sub-multiples of their internal frequency reference to be used as an external reference.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf