STC8A8K64D4 Series Manual
-
6. Clock, Reset, Power saving mode and Power
Management
6.1 System Clock Control
The system clock controller provides the clock sources for the microcontroller's CPU and all peripherals. One of the
following three clock sources can be selected as the system clock: internal high-precision IRC, internal 32KHz IRC with large
error, external crystal oscillator. Every clock source can be enabled or disabled respectively using programs, as well as
internally provide clock divider for the purpose of reducing power consumption.
When the microcontroller enters Power-down mode, the clock controller will shut down all clock sources.
internal high-precision IRC
System clock structure diagram
external Crystal oscillator or
external clock
internal 32KHz
MCKSEL[1:0]
00
01
10
11
System clock
(SYSclk)
MCLKODIV[6:0]
CLKDIV[7:0]
P1.6
P5.4
MCLKO_S
0
1
Main Clock
(MCLK)
Related registers
Internal High speed Oscillator control register
External Oscillator control register
Internal 32KHz Oscillator control register
Main clock output control register
Internal IRC start-up and debounce control
6.1.1 System clock selection register (CKSEL)
MCKSEL[1:0]: Main clock source selection
internal high speed high precision IRC
external high speed crystal oscillator
internal 32KHz low speed IRC
6.1.2 Clock Division register (CLKDIV)
CLKDIV: Main clock dividing factor. The system clock (SYSCLK) is the clock signal of main clock (MCLK) after being
divided.