Microchip Technology MCP1631RD-MCC2 Data Sheet

Page of 338
 2006-2012 Microchip Technology Inc.
DS41291G-page 67
PIC16F882/883/884/886/887
4.3
Clock Source Modes
Clock Source modes can be classified as external or
internal.
• External Clock modes rely on external circuitry for 
the clock source. Examples are: oscillator mod-
ules (EC mode), quartz crystal resonators or 
ceramic resonators (LP, XT and HS modes) and 
Resistor-Capacitor (RC) mode circuits.
• Internal clock sources are contained internally 
within the oscillator module. The oscillator module 
has two internal oscillators: the 8 MHz High-
Frequency Internal Oscillator (HFINTOSC) and 
the 31 kHz Low-Frequency Internal Oscillator 
(LFINTOSC).
The system clock can be selected between external or
internal clock sources via the System Clock Select
(SCS) bit of the OSCCON register. See 
 for additional information.
4.4
External Clock Modes
4.4.1
OSCILLATOR START-UP TIMER 
(OST)
If the oscillator module is configured for LP, XT or HS
modes, the Oscillator Start-up Timer (OST) counts
1024 oscillations from OSC1. This occurs following a
Power-on Reset (POR) and when the Power-up Timer
(PWRT) has expired (if configured), or a wake-up from
Sleep. During this time, the program counter does not
increment and program execution is suspended. The
OST ensures that the oscillator circuit, using a quartz
crystal resonator or ceramic resonator, has started and
is providing a stable system clock to the oscillator
module. When switching between clock sources, a
delay is required to allow the new clock to stabilize.
These oscillator delays are shown in 
In order to minimize latency between external oscillator
start-up and code execution, the Two-Speed Clock
Start-up mode can be selected (see 
).
TABLE 4-1:
OSCILLATOR DELAY EXAMPLES
4.4.2
EC MODE
The External Clock (EC) mode allows an externally
generated logic level as the system clock source. When
operating in this mode, an external clock source is
connected to the OSC1 input and the OSC2 is available
for general purpose I/O. 
 shows the pin
connections for EC mode.
The Oscillator Start-up Timer (OST) is disabled when
EC mode is selected. Therefore, there is no delay in
operation after a Power-on Reset (POR) or wake-up
from Sleep. Because the PIC
®
 MCU design is fully
static, stopping the external clock input will have the
effect of halting the device while leaving all data intact.
Upon restarting the external clock, the device will
resume operation as if no time had elapsed.
FIGURE 4-2:
EXTERNAL CLOCK (EC) 
MODE OPERATION
Switch From
Switch To
Frequency
Oscillator Delay
Sleep/POR
LFINTOSC
HFINTOSC
31 kHz
125 kHz to 8 MHz
Oscillator Warm-up Delay (T
WARM
)
Sleep/POR
EC, RC
DC – 20 MHz
2 cycles
LFINTOSC (31 kHz)
EC, RC
DC – 20 MHz
1 cycle of each
Sleep/POR
LP, XT, HS
32 kHz to 20 MHz
1024 Clock Cycles (OST)
LFINTOSC (31 kHz)
HFINTOSC
125 kHz to 8 MHz
1
s (approx.)
OSC1/CLKIN
OSC2/CLKOUT
(1)
I/O
Clock from
Ext. System
PIC
®
 MCU
Note 1:
Alternate pin functions are listed in the