#### Re: Todd's ELF-ish gets gets a Video Interface System (VIS)

Lee Hart

taf123 wrote:
In the mean-time, the much awaited 11.3258Mhz crystal arrived.

Anyways, this oscillator didn't work. I copied it from the RTC circuit,
which only used a 32kHz crystal. Turns out, this same design can be
used at higher frequencies, but the load 220k load resister (the blue
one tucked next to the crystal) actually needs to be a capacitor to
compensate for the phase shift of the inverter at speed.

Updated it to 39pF and it oscillated just fine.
Hi Todd,

Here's the deal on the oscillator: Crystals are mechanical resonators, like a bell or guitar string. A mechanical resonator has more than one resonant frequency; its fundamental (X1), and all the odd harmonics (X3, X5, X7...)

The 32 KHz crystal will therefore happily oscillate at 32x3=96 KHz, 160 KHz, 224 KHz etc.

The inverter obviously has lots of gain at these frequencies, too. If the oscillator "starts on the wrong foot", it can lock in on one of these harmonics -- not what is desired! This can happen if there is a noise glitch on the input, or the power supply voltage rises too sharply, or some physical bump makes the crystal "ring", etc.

So, the 220K resistor (at location C33) was added. The 220K and 39pF (at location C30) form an RC filter that rolls off the inverter's gain at higher frequencies. 220k x 39pf = 8.5 usec = 116 KHz. That way, it only has enough gain to oscillate at the fundamental; 32 KHz.

Now replace the 32 KHz crystal with your 11.3 MHz. There's no gain at that frequency, so it won't oscillate! You have to substantially reduce the value of that 220k to roll off the frequency above the 3rd harmonic. That would be 11.3 x 3 = 33.9 MHz. With the 39pf, the resistor has to be 2.2k.

In fact, the gain of a 74HC04 inverter is falling off anyway at this frequency. And, it already has several hundred ohms of internal resistance in its output. So an even lower value will work (like 1k or 1.5k).

What will a capacitor at C33 do? It will actually *increase* the high-frequency gain of the inverter. That's not what you want; it increases the chance of oscillating at some harmonic. Then the only thing stopping it would be if the inverter itself does not have enough gain to oscillate at 33.9 MHz or more.

--
Fools ignore complexity. Pragmatists suffer it. The wise avoid it.
Geniuses remove it. -- Alan Perlis, "Epigrams on Programming"
--
Lee Hart, 814 8th Ave N, Sartell MN 56377, www.sunrise-ev.com

Join cosmacelf@groups.io to automatically receive all group messages.