Microchip Technology MCP1630DM-DDBS1 Data Sheet

Page of 176
©
 2007 Microchip Technology Inc.
DS41211D-page 19
PIC12F683
3.0
OSCILLATOR MODULE (WITH 
FAIL-SAFE CLOCK MONITOR)
3.1
Overview
The Oscillator module has a wide variety of clock
sources and selection features that allow it to be used
in a wide range of applications while maximizing perfor-
mance and minimizing power consumption. Figure 3-1
illustrates a block diagram of the Oscillator module.
Clock sources can be configured from external
oscillators, quartz crystal resonators, ceramic resonators
and Resistor-Capacitor (RC) circuits. In addition, the
system clock source can be configured from one of two
internal oscillators, with a choice of speeds selectable via
software. Additional clock features include:
• Selectable system clock source between external 
or internal via software.
• Two-Speed Start-up mode, which minimizes 
latency between external oscillator start-up and 
code execution.
• Fail-Safe Clock Monitor (FSCM) designed to 
detect a failure of the external clock source (LP, 
XT, HS, EC or RC modes) and switch 
automatically to the internal oscillator.
The Oscillator module can be configured in one of eight
clock modes.
1.
EC – External clock with I/O on OSC2/CLKOUT.
2.
LP – 32 kHz Low-Power Crystal mode.
3.
XT – Medium Gain Crystal or Ceramic
Resonator Oscillator mode.
4.
HS – High Gain Crystal or Ceramic Resonator
mode.
5.
RC – External Resistor-Capacitor (RC) with
F
OSC
/4 output on OSC2/CLKOUT.
6.
RCIO – External Resistor-Capacitor (RC) with
I/O on OSC2/CLKOUT.
7.
INTOSC – Internal oscillator with F
OSC
/4 output
on OSC2 and I/O on OSC1/CLKIN.
8.
INTOSCIO – Internal oscillator with I/O on
OSC1/CLKIN and OSC2/CLKOUT.
Clock Source modes are configured by the FOSC<2:0>
bits in the Configuration Word register (CONFIG). The
internal clock can be generated from two internal
oscillators. The HFINTOSC is a calibrated
high-frequency oscillator. The LFINTOSC is an
uncalibrated low-frequency oscillator.
FIGURE 3-1:
PIC
®
 MCU CLOCK SOURCE BLOCK DIAGRAM 
(CPU and Peripherals)
OSC1
OSC2
Sleep
External Oscillator
LP, XT, HS, RC, RCIO, EC
System Clock
P
o
st
sc
aler
MU
X
MU
X
8 MHz
4 MHz
2 MHz
1 MHz
500 kHz
125 kHz
250 kHz
IRCF<2:0>
111
110
101
100
011
010
001
000
31 kHz
Power-up Timer (PWRT)
FOSC<2:0>
(Configuration Word Register)
SCS<0>
(OSCCON Register)
Internal Oscillator
(OSCCON Register)
Watchdog Timer (WDT)
Fail-Safe Clock Monitor (FSCM)
HFINTOSC
8 MHz
LFINTOSC
31 kHz
INTOSC