Datasheet

2012 Microchip Technology Inc. DS30575A-page 51
PIC18F97J94 FAMILY
3.6.2 PRIMARY OSCILLATOR START-UP
FROM SLEEP MODE
The most difficult time for the oscillator to start-up is
when waking up from Sleep mode. This is because the
load capacitors have both partially charged to some
quiescent value and phase differential at wake-up is
minimal. Thus, more time is required to achieve stable
oscillation. Also remember that low voltage, high tem-
peratures and the lower frequency clock modes also
impose limitations on loop gain, which in turn, affects
start-up.
Each of the following factors increases the start-up
time:
Low-frequency design (with a Low Gain Clock
mode)
Quiet environment (such as a battery-operated
device)
Operating in a shielded box (away from the noisy
RF area)
Low voltage
High temperature
Wake-up from Sleep mode
Circuit noise, on the other hand, may actually help to
“kick start” the oscillator and help to lower the oscillator
start-up time.
3.6.3 OSCILLATOR START-UP TIMER
In order to ensure that a crystal oscillator (or ceramic
resonator) has started and stabilized, an Oscillator
Start-up Timer (OST) is provided. The OST is a simple,
10-bit counter that counts 1024 T
OSC cycles before
releasing the oscillator clock to the rest of the system.
This time-out period is designated as T
OST. The ampli-
tude of the oscillator signal must reach the V
IL and VIH
thresholds for the oscillator pins before the OST can
begin to count cycles.
The T
OST interval is required every time the oscillator
has to restart (i.e., on POR, BOR and wake-up from
Sleep mode). The Oscillator Start-up Timer is applied to
the MS and HS modes for the Primary Oscillator, as well
as the Secondary Oscillator, SOSC (see Section 3.9
“Secondary Oscillator (SOSC)”).
3.6.4 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 manu-
facture, 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
3.6.5 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 PIC18F 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 dif-
ference between the MS 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 resis-
tor, capacitor 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, sup-
ply 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 temper-
ature and low V
DD both have a limiting effect on the