AN202
V1.0 | Page 39/73
www.cmostek.com
5 MCU SystemClock Source
System Clock
111
110
101
100
011
010
001
000
P
re
s
c
a
le
r
16MHz
8MHz
4MHz
2MHz
1MHz
500KHz
INTOSC
16MHz
Internal
OSC
256KHz
Internal
OSC
/8
0
1
LFMOD
TIMER2
Power-up timer(PWT)
Watchdog timer(WDT)
Fail safe clock monitor(FSCM)
IRCF<2:0>(OSCCON)
Only INTOSC,
OSCCON_SCS<0> = 1
Figure 5-1. System Clock Source Diagram
The chip contains three clock sources: twobuilt-in oscillators as variousclock sources, and one external clock
input source. The built-in oscillator includes one internal 16M high-frequency precise oscillator (HFINTOSC),
and one internal 32K/256Klow-frequency and low-power oscillator (LFINTOSC).These clocks or oscillators,
combined with prescaler, can provide the system with a variety of frequency clock sources. The prescaler
ratio of the system clock source can be controlled by the IRCF<2:0> bit in the OPTION register.
Note:
The watchdog, the system clock source (IRCF=000) and the PWRT use the output uniformlyafter 8 frequency
division, that is32KHz, regardless of the value of the LFMOD.
5.1
Clock Source Mode
Clock source mode can be classified as external or internal.
The external clock mode relies on the external circuit forthe clock source, such as the external clock EC
mode, the crystal oscillator XT and LP mode. But because the related pins are not drawn out, CMT2189C
can not use the external clock mode, and can only use the internal clock mode.
The internal clock mode is built in the oscillator module. The oscillator module has a 16MHz high
frequency oscillator and a 32KHz low frequency oscillator.
The internal or external clock source can be selected by the System Clock Selectbit(SCS) of the OSCCON
register.