Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
PIC24F Family Reference Manual
DS39700C-page 6-16 © 2009 Microchip Technology Inc.
6.5.2.3 TUNING THE OSCILLATOR CIRCUIT
Since Microchip devices have wide operating ranges (frequency, voltage and temperature;
depending on the part and version ordered) and external components (crystals, capacitors, etc.)
of varying quality and manufacture, validation of operation needs to be performed to ensure that
the component selection will comply with the requirements of the application. There are many
factors that go into the selection and arrangement of these external components. Depending on
the application, these may include any of the following:
• Amplifier gain
• Desired frequency
• Resonant frequency(s) of the crystal
• Temperature of operation
• Supply voltage range
• Start-up time
• Stability
• Crystal life
• Power consumption
• Simplification of the circuit
• Use of standard components
• Component count
6.5.2.4 DETERMINING THE BEST VALUES FOR OSCILLATOR COMPONENTS
The best method for selecting components is to apply a little knowledge and a lot of trial
measurement and testing. Crystals are usually selected by their parallel resonant frequency only;
however, other parameters may be important to your design, such as temperature or frequency
tolerance. Microchip Application Note AN588, “PICmicro
®
Microcontroller Oscillator Design
Guide” is an excellent reference to learn more about crystal operation and ordering information.
The PIC24F internal oscillator circuit is a parallel oscillator circuit which requires that a parallel
resonant crystal be selected. The load capacitance is usually specified in the 22 pF to 33 pF
range. The crystal will oscillate closest to the desired frequency with a load capacitance in this
range. It may be necessary to alter these values, as described later, in order to achieve other
benefits.
The clock mode is primarily chosen based on the desired frequency of the crystal oscillator. The
main difference between the XT and HS Oscillator modes is the gain of the internal inverter of
the oscillator circuit which allows the different frequency ranges. In general, use the oscillator
option with the lowest possible gain that still meets specifications. This will result in lower
dynamic currents (I
DD). The frequency range of each oscillator mode is the recommended
frequency cutoff, but the selection of a different gain mode is acceptable as long as a thorough
validation is performed (voltage, temperature and component variations, such as resistor, capac-
itor and internal oscillator circuitry). 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 device 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 so that it will oscillate at the highest temperature and the lowest
V
DD that the circuit will be expected to perform under. High temperature and low VDD both have
a limiting effect on the loop gain, such that if the circuit functions at these extremes, the designer
can be more assured of proper operation at other temperatures and supply voltage combina-
tions. The output sine wave should not be clipped in the highest gain environment (highest V
DD
and lowest temperature) and the sine output amplitude should be large enough in the lowest gain
environment (lowest V
DD and highest temperature) to cover the logic input requirements of the
clock, as listed in the device data sheet. OSC1 may have specified V
IL and VIH levels (refer to
the specific product data sheet for more information).
Protego_Release_01_05-Related-OEM-Documentation-PIC24FJ32MC10X-Reference_Manual-Section6-Oscillator.pdf