Datasheet
2011 Microchip Technology Inc. Preliminary DS41586A-page 50
PIC16(L)F1507
5.3 Clock Switching
The system clock source can be switched between
external and internal clock sources via software using
the System Clock Select (SCS) bits of the OSCCON
register. The following clock sources can be selected
using the SCS bits:
• Default system oscillator determined by FOSC
bits in Configuration Words
• Internal Oscillator Block (INTOSC)
5.3.1 SYSTEM CLOCK SELECT (SCS)
BITS
The System Clock Select (SCS) bits of the OSCCON
register selects the system clock source that is used for
the CPU and peripherals.
• When the SCS bits of the OSCCON register = 00,
the system clock source is determined by value of
the FOSC<1:0> bits in the Configuration Words.
• When the SCS bits of the OSCCON register = 1x,
the system clock source is chosen by the internal
oscillator frequency selected by the IRCF<3:0>
bits of the OSCCON register. After a Reset, the
SCS bits of the OSCCON register are always
cleared.
When switching between clock sources, a delay is
required to allow the new clock to stabilize. These oscil-
lator delays are shown in Table 5-2.
TABLE 5-1: OSCILLATOR SWITCHING DELAYS
Switch From Switch To Frequency Oscillator Delay
Sleep/POR
LFINTOSC
HFINTOSC
31 kHz
31.25kHz-16MHz
Oscillator Warm-up Delay (T
WARM)
Sleep/POR EC DC – 20 MHz 2 cycles
LFINTOSC EC DC – 20 MHz 1 cycle of each
Any clock source HFINTOSC 31.25 kHz-16 MHz 2 s (typical)
Any clock source LFINTOSC 31 kHz 1 cycle of each