PIC18F97J60 FAMILY
DS39762A-page 44
Advance Information
2006 Microchip Technology Inc.
2.7.1.1
System Clock Selection and the
FOSC2 Configuration Bit
The SCS bits are cleared on all forms of Reset. In the
device’s default configuration, this means the primary
oscillator defined by FOSC1:FOSC0 (that is, one of the
HC or EC modes) is used as the primary clock source
on device Resets.
The default clock configuration on Reset can be changed
with the FOSC2 Configuration bit. This bit affects the
clock source selection setting when SCS1:SCS0 =
00
.
When FOSC2 =
1
(default), the oscillator source
defined by FOSC1:FOSC0 is selected whenever
SCS1:SCS0 =
00
. When FOSC2 =
0
, the INTRC oscilla-
tor is selected whenever SCS1:SCS2 =
00
. Because the
SCS bits are cleared on Reset, the FOSC2 setting also
changes the default oscillator mode on Reset.
Regardless of the setting of FOSC2, INTRC will always
be enabled on device power-up. It will serve as the
clock source until the device has loaded its configura-
tion values from memory. It is at this point that the
FOSC Configuration bits are read and the oscillator
selection of operational mode is made.
Note that either the primary clock or the internal
oscillator will have two bit setting options, at any given
time, depending on the setting of FOSC2.
2.7.2
OSCILLATOR TRANSITIONS
PIC18F97J60 family devices contain circuitry to
prevent clock “glitches” when switching between clock
sources. A short pause in the device clock occurs
during the clock switch. The length of this pause is the
sum of two cycles of the old clock source and three to
four cycles of the new clock source. This formula
assumes that the new clock source is stable.
Clock transitions are discussed in greater detail in
Section 3.1.2 “Entering Power-Managed Modes”
.
2.8
Effects of Power-Managed Modes
on the Various Clock Sources
When PRI_IDLE mode is selected, the designated
primary oscillator continues to run without interruption.
For all other power-managed modes, the oscillator
using the OSC1 pin is disabled. The OSC1 pin (and
OSC2 pin if used by the oscillator) will stop oscillating.
In
SEC_IDLE), the Timer1 oscillator is operating and
providing the device clock. The Timer1 oscillator may
also run in all power-managed modes if required to
clock Timer1 or Timer3.
secondary
clock
modes
(SEC_RUN
and
In RC_RUN and RC_IDLE modes, the internal oscilla-
tor provides the device clock source. The 31 kHz
INTRC output can be used directly to provide the clock
and may be enabled to support various special
features, regardless of the power-managed mode (see
Section 24.2 “Watchdog Timer (WDT)”
through
Section 24.5 “Fail-Safe Clock Monitor”
for more
information on WDT, Fail-Safe Clock Monitor and
Two-Speed Start-up).
If the Sleep mode is selected, all clock sources are
stopped. Since all the transistor switching currents have
been stopped, Sleep mode achieves the lowest current
consumption of the device (only leakage currents).
Enabling any on-chip feature that will operate during
Sleep will increase the current consumed during Sleep.
The INTRC is required to support WDT operation. The
Timer1 oscillator may be operating to support a
Real-Time Clock. Other features may be operating that
do not require a device clock source (i.e., MSSP slave,
PSP, INTx pins and others). Peripherals that may add
significant
current
consumption
Section 27.2 “DC Characteristics: Power-Down and
Supply Current”
.
are
listed
in
2.9
Power-up Delays
Power-up delays are controlled by two timers, so that
no external Reset circuitry is required for most applica-
tions. The delays ensure that the device is kept in
Reset until the device power supply is stable under nor-
mal circumstances and the primary clock is operating
and stable. For additional information on power-up
delays, see
Section 4.5 “Power-up Timer (PWRT)”
.
The first timer is the Power-up Timer (PWRT), which
provides a fixed delay on power-up (parameter 33,
Table 27-12); it is always enabled.
The second timer is the Oscillator Start-up Timer
(OST), intended to keep the chip in Reset until the
crystal oscillator is stable (HS modes). The OST does
this by counting 1024 oscillator cycles before allowing
the oscillator to clock the device.
There is a delay of interval T
CSD
(parameter 38,
Table 27-12), following POR, while the controller
becomes ready to execute instructions.
TABLE 2-3:
OSC1 AND OSC2 PIN STATES IN SLEEP MODE
Oscillator Mode
OSC1 Pin
OSC2 Pin
EC, ECPLL
HS, HSPLL
Floating, pulled by external clock
Feedback inverter disabled at quiescent
voltage level
See Table 4-2 in
Section 4.0 “Reset”
for time-outs due to Sleep and MCLR Reset.
At logic low (clock/4 output)
Feedback inverter disabled at quiescent
voltage level
Note: