Datasheet

2013-2015 Microchip Technology Inc. DS40001723D-page 49
PIC12(L)F1571/2
5.2 Clock Source Types
Clock sources can be classified as external or internal.
External clock sources rely on external circuitry for the
clock source to function.
Internal clock sources are contained within the
oscillator module. The internal oscillator block has two
internal oscillators and a dedicated Phase-Locked
Loop (HFPLL) that are used to generate three internal
system clock sources: the 16 MHz High-Frequency
Internal Oscillator (HFINTOSC), 500 kHz Medium
Frequency Internal Oscillator (MFINTOSC) 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<1:0>) bits in the OSCCON register. See
Section 5.3 Clock Switching” for additional
information.
5.2.1 EXTERNAL CLOCK SOURCES
An external clock source can be used as the device
system clock by performing one of the following
actions:
Program the FOSC<1:0> bits in the Configuration
Words to select an external clock source that will
be used as the default system clock upon a
device Reset.
Write the SCS<1:0> bits in the OSCCON register
to switch the system clock source to:
- Timer1 oscillator during run time, or
- An external clock source determined by the
value of the FOSCx bits.
See Section 5.3 “Clock Switching” for more
information.
5.2.1.1 EC Mode
The External Clock (EC) mode allows an externally
generated logic level signal to be the system clock
source. When operating in this mode, an external clock
source is connected to the CLKIN input. CLKOUT is
available for general purpose I/Os or CLKOUT.
Figure 5-2 shows the pin connections for EC mode.
EC mode has three power modes to select from through
the FOSCx bits in the Configuration Words:
ECH – High power, 4-20 MHz
ECM – Medium power, 0.5-4 MHz
ECL – Low power, 0-0.5 MHz
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 5-2: EXTERNAL CLOCK (EC)
MODE OPERATION
CLKIN
CLKOUT
Clock from
Ext. System
PIC
®
MCU
FOSC/4 or
Note 1: Output depends upon CLKOUTEN
bit of
the Configuration Words.
I/O
(1)