1997 Microchip Technology Inc. DS31002A-page 2-9
Section 2. Oscillator
Oscillator
2
2.3.3.1 Determining Best Values for Crystals, Clock Mode, C1, C2, and Rs
The best method for selecting components is to apply a little knowledge and a lot of trial, mea-
surement, and testing.
Crystals are usually selected by their parallel resonant frequency only, however other parame-
ters may be impor tant to your design, such as temperature or frequency tolerance. Application
Note AN588 is an e xcellent ref erence if y ou would lik e to know more about crystal operation and
their ordering information.
The PICmicros™ internal oscillator circuit is a parallel oscillator circuit, which requires that a par-
allel resonant crystal be selected. The load capacitance is usually specified in the 20 pF to 32 pF
range. The crystal will oscillate closest to the desired frequency with capacitance in this range. It
ma y be necessary to sometimes juggle these values a bit, as described later , in order to achie v e
other benefits.
Clock mode is primarily chosen by using the FOSC par ameter specification (parameter 1A) in the
device’s data sheet, based on frequency. Clock modes (except RC) are simply gain selections,
lower gain for lower frequencies, higher gain for higher frequencies. It is possible to select a
higher or lower gain, if desired, based on the specific needs of the oscillator circuit.
C1 and C2 should also be initially selected based on the load capacitance as suggested by the
crystal manufacturer and the tables supplied in the device data sheet. The values given in the
Microchip data sheet can only be used as a starting point, since the crystal manufacturer , supply
voltage, and other factors already mentioned may cause your circuit to differ from the one used
in the factory characterization process.
Ideally, the capacitance is chosen (within the r ange of the recommended crystal load preferab ly)
so that it will oscillate at the highest temperature and low est VDD that the circuit will be expected
to perf orm under . High temperature and low VDD both ha ve a limiting aff ect on the loop gain, such
that if the circuit functions at these e xtremes, the designer can be more assured of proper oper-
ation at other temperatures and supply voltage combinations. The output sine wave should not
be clipped in the highest gain environment (highest VDD and lowest temperature) and the sine
output amplitude should be great enough in the low est gain environment (lowest VDD and highest
temperature) to cov er the logic input requirements of the cloc k as listed in the de vice data sheet.
A method for improving star t-up is to use a value of C2 greater than C1. This causes a greater
phase shift across the crystal at power-up, which speeds oscillator start-up.
Besides loading the crystal for proper frequency response, these capacitors can have the effect
of lowering loop gain if their value is increased. C2 can be selected to affect the overall gain of
the circuit. A higher C2 can lower the gain if the crystal is being over driven (see also discussion
on Rs). Capacitance values that are too high can store and dump too much current through the
cr ystal, so C1 and C2 should not become excessively large. Unfor tunately, measuring the watt-
age through a crystal is tricky b usiness , but if you do not stray too far from the suggested v alues
you should not have to be concerned with this.
A series resistor , Rs, is added to the circuit if, after all other external components are selected to
satisf action, the crystal is still being over driv en. This can be determined by looking at the OSC2
pin, which is the driven pin, with an oscilloscope. Connecting the probe to the OSC1 pin will load
the pin too much and negativ ely aff ect perf ormance. Remember that a scope probe adds its o wn
capacitance to the circuit, so this may have to be accounted for in your design, i.e. if the circuit
worked best with a C2 of 20 pF and scope probe was 10 pF, a 30 pF capacitor may actually be
called f or. The output signal should not be clipping or squashed. Overdriving the crystal can also
lead to the circuit jumping to a higher harmonic level or even crystal damage.