SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 44
Version 1.0
EXTERNAL HIGH-SPEED OSCILLATOR
SN8P1829 can be operated in four different oscillator modes. There are external RC oscillator modes, high
crystal/resonator mode (12M code option), standard crystal/resonator mode (4M code option) and low crystal mode
(32K code option). For different application, the users can select one of satiable oscillator mode by programming code
option to generate system high-speed clock source after reset.
Example: Stop external high-speed oscillator.
B0BSET
FSTPHX
; To stop external high-speed oscillator only.
B0BSET
FCPUM0
; To stop external high-speed oscillator and external low-speed
; oscillator called power down mode (sleep mode).
OSCILLATOR MODE CODE OPTION
SN8P1829 has four oscillator modes for different applications. These modes are 4M, 12M, 32K and RC. The main
purpose is to support different oscillator types and frequencies. High-speed crystal needs more current but the low one
doesn’t. For crystals, there are three steps to select. If the oscillator is RC type, to select “RC” and the system will
divide the frequency by 2 automatically. User can select oscillator mode from Code Option table before compiling. The
table is as follow.
Code Option
Oscillator Mode
Remark
00
RC mode
Output the F
CPU
square wave from X
OUT
pin.
01
32K 32768Hz
10
12M 12MHz
~
16MHz
11
4M 3.58MHz
OSCILLATOR DEVIDE BY 2 CODE OPTION
SN8P1829 has an external clock divide by 2 function. It is a code option called “High_Clk / 2”. If “High_Clk / 2” is
enabled, the external clock frequency is divided by 8 for the F
CPU
. F
CPU
is equal to Fosc/8. If “High_Clk / 2” is disabled,
the external clock frequency is divided by 4 for the F
CPU
. The F
CPU
is equal to Fosc/4.
Note: In RC mode, “High_Clk / 2” is always enabled.
OSCILLATOR SAFE GUARD CODE OPTION
SN8P1829 builds in an oscillator safe guard (OSG) to make oscillator more stable. It is a low-pass filter circuit and
stops high frequency noise into system from external oscillator circuit. This function makes system to work better under
AC noisy conditions.