PIC12F635/PIC16F636/639
3.2 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 modules (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
PIC12F635/PIC16F636/639. The device has two inter-
nal oscillators: the 8 MHz High-Frequency Internal
Oscillator (HFINTOSC) and 31 kHz Low-Frequency
Internal Oscillator (LFINTOSC).
The system clock can be selected between external or
internal clock sources via the System Clock Selection
(SCS) bit (see Section 3.5 “Clock Switching”).
3.3 External Clock Modes
3.3.1 OSCILLATOR START-UP TIMER (OST)
If the PIC12F635/PIC16F636/639 is configured for LP,
XT or HS modes, the Oscillator Start-up Timer (OST)
counts 1024 oscillations from the OSC1 pin following a
Power-on Reset (POR) and 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 PIC12F635/
PIC16F636/639.
When switching between clock sources, a delay is
required to allow the new clock to stabilize. Table 3-1
shows oscillator delay examples.
In order to minimize latency between external oscillator
start-up and code execution, the Two-Speed Clock Start-
up mode can be selected (see Section 3.6 “Two-Speed
Clock Start-up Mode”).
TABLE 3-1: OSCILLATOR DELAY EXAMPLES
Switch From
Switch To
Frequency
Sleep/POR
Sleep/POR
LFINTOSC (31 kHz)
Sleep/POR
LFINTOSC
HFINTOSC
EC, RC
EC, RC
LP, XT, HS
31 kHz
125 kHz-8 MHz
DC – 20 MHz
DC – 20 MHz
31 kHz-20 MHz
LFINTOSC (31 kHz)
HFINTOSC
125 kHz-8 MHz
Oscillator Delay
5 μs-10 μs (approx.)
CPU Start-up
1024 Clock Cycles (OST)
1 μs (approx.)
DS41232B-page 30
Preliminary
© 2005 Microchip Technology Inc.