English
Language : 

C8051F336_08 Datasheet, PDF (109/227 Pages) Silicon Laboratories – Mixed-Signal Byte-Programmable EPROM MCU
C8051F336/7/8/9
19. Oscillators and Clock Selection
C8051F336/7/8/9 devices include a programmable internal high-frequency oscillator, a programmable
internal low-frequency oscillator, and an external oscillator drive circuit. The internal high-frequency oscilla-
tor can be enabled/disabled and calibrated using the OSCICN and OSCICL registers, as shown in
Figure 19.1. The internal low-frequency oscillator can be enabled/disabled and calibrated using the
OSCLCN register. The system clock can be sourced by the external oscillator circuit or either internal oscil-
lator. Both internal oscillators offer a selectable post-scaling feature.
OSCICL
OSCICN
OSCLCN
Option 3
XTAL2
Option 2
VDD
XTAL2
Option 4
XTAL2
Option 1
XTAL1
10MΩ
XTAL2
EN
Programmable
Internal Clock
Generator
OSCLF
EN
Low Frequency
Oscillator
Input
Circuit
OSC
OSCLF OSCLD
n
n
OSCLD
SYSCLK
OSCXCN
CLKSEL
Figure 19.1. Oscillator Options
19.1. System Clock Selection
The CLKSL[1:0] bits in register CLKSEL select which oscillator source is used as the system clock.
CLKSL[1:0] must be set to 01b for the system clock to run from the external oscillator; however the exter-
nal oscillator may still clock certain peripherals (timers, PCA) when the internal oscillator is selected as the
system clock. The system clock may be switched on-the-fly between the internal oscillator, external oscilla-
tor, and Clock Multiplier so long as the selected clock source is enabled and has settled.
The internal high-frequency and low-frequency oscillators require little start-up time and may be selected
as the system clock immediately following the register write which enables the oscillator. The external RC
and C modes also typically require no startup time.
External crystals and ceramic resonators however, typically require a start-up time before they are settled
and ready for use. The Crystal Valid Flag (XTLVLD in register OSCXCN) is set to '1' by hardware when the
external crystal or ceramic resonator is settled. In crystal mode, to avoid reading a false XTLVLD, soft-
ware should delay at least 1 ms between enabling the external oscillator and checking XTLVLD.
Rev.1.0
109