An oscillator can be made without the crystal by placing a coil in place of the crystal. The coil and crystal load capacitors make up a tuned circuit. The oscillator will run at the resonant frequency of this tuned circuit. The resonant frequency is:
1 / (2 pi * sqr root (L * C))
where C is the capacitance of the crystal load capacitors in series.
As an example: I wanted an oscillator to run at the third multiple of a 14.31818MHz series resonant crystal. This is about 42.954MHz. I used a 15pf fixed input load capacitor and a 3-25pf variable cap for the output load on the oscillator. The inductor I used was 1.0uH. This calculates to 54MHz ignoring stray capacitances. I figure that there is about 3pf to 5pf per component in the circuit layout. This gives a stray capacitance of about 12pf stray across each load cap. With these strays thrown into the calculation the resonant frequency is more like 43.7MHz. This is in the range to allow adjusting to get the 42.954MHz desired. The variable cap must be able to vary the oscillator frequency both above and below the crystal frequency to allow for circuit variations.
Once the oscillator runs with the LC resonate circuit, install the crystal. Adjusting the variable cap should cause the frequency to vary until it gets close to the overtone of the crystal at which time the frequency will snap to that frequency. Adjust the cap to the center of the range that guarantees the oscillator starts at the right frequency every time power is applied to the circuit.
Another way to make an overtone oscillator is to put a low pass filter at the input to the crystal. This filter reduces the oscillator loop gain at the fundamental resonant frequency of the crystal allowing the circuit to oscillate at the third harmonic. This filter can be an inductor from the output of the oscillator to ground. Place a capacitor (0.1uf) in series with the coil to prevent putting a DC short on the output of the oscillator. Choose the coil to resonate with the output load and stray capacitances somewhere above the second harmonic of the crystal but below the third harmonic of the desired oscillation frequency.
Another example using a 14.31818MHz crystal tripled to 42.954MHz: I used 15pf input and output loading caps. With 12pf strays, a 0.68uh coil would resonate at about 37MHz. As in the above example, values may have to be ajusted to compensate for component tolerances, stray capacitance and inductance, and circuit layout variations.
Both oscillator circuits must have the lead lengths kept very short including the ground or power supply traces. The SX must have very good AC bypass with short ground and power supply traces to the bypass cap. Do not measure the oscillator frequency at the oscillator pins; the oscilloscope probe will affect the frequency because of its capacitance. Instead write a test program that loops toggling an output port bit at a known rate (in oscillator cycles) and use this pin for your measurments.
The OSC2 pin (oscillator output) of the SX is used as a bidirectional data pin during programming. An overtone oscillator will prevent the SX-Key from programming the SX by loading the OSC2 pin on the SX. A similar problem is encountered when using a crystal oscillator can. The output of the oscillator can will fight with the SX-Key for use of the OSC1 pin (oscillator input) of the SX being programmed. The programmer also applies +12 volts to the OSC2 pin. This voltage will is fatal to an oscillator can.
Place a capacitor in series with a current limiting resistor between the oscillator can output and the SX oscillator input to protect the oscillator can output from the programming voltage. I use a 150 ohm resistor in series with a 68pf cap from the oscillator output to the SX OSC1 input. I also add a 51 ohm resistor between the SX-Key OSC1 pin and the SX OSC1 pin. This should be enough isolation to protect both the SX-Key and the oscillator can.
For applications that don't need a crystal's precision, a ceramic resonator can be used. Digi-Key sells ECS Inc. ceramic resonators up to 20MHz. This isn't too bad in Turbo mode. I talked to Parallax about the 50MHz cerramic resonator they use on the SX-Key Demo Board. I was told that they will be selling them at about $1.60 each. A brochure is in the works with details about SX and BASIC Stamp related products.
Last updated April 20, 1998
Copyright 1998 Richard Ottosen