C8051F340/1/2/3/4/5/6/7

SFR Definition 14.4. OSCXCN: External Oscillator Control

R

 

R/W

R/W

R/W

R

R/W

R/W

R/W

XTLVLD

 

XOSCMD2

XOSCMD1

XOSCMD0

 

-

XFCN2

XFCN1

XFCN0

Bit7

 

Bit6

Bit5

Bit4

Bit3

Bit2

Bit1

Bit0

Bit7:

XTLVLD: Crystal Oscillator Valid Flag.

 

 

 

 

 

(Read only when XOSCMD = 11x.)

 

 

 

 

0:Crystal Oscillator is unused or not yet stable.

1:Crystal Oscillator is running and stable. Bits6–4: XOSCMD2–0: External Oscillator Mode Bits.

00x: External Oscillator circuit off.

010:External CMOS Clock Mode.

011:External CMOS Clock Mode with divide by 2 stage.

100:RC Oscillator Mode.

101:Capacitor Oscillator Mode.

110:Crystal Oscillator Mode.

111:Crystal Oscillator Mode with divide by 2 stage.

Bit3:

RESERVED. Read = 0, Write = don't care.

Bits2–0:

XFCN2–0: External Oscillator Frequency Control Bits.

 

000-111: See table below:

Reset Value

00000000

SFR Address:

0xB1

XFCN

Crystal (XOSCMD = 11x)

RC (XOSCMD = 10x)

C (XOSCMD = 10x)

000

f 32 kHz

f 25 kHz

K Factor = 0.87

001

32 kHz < f 84kHz

25 kHz < f 50 kHz

K Factor = 2.6

010

84 kHz < f 225 kHz

50 kHz < f 100 kHz

K Factor = 7.7

011

225 kHz < f 590 kHz

100 kHz < f 200 kHz

K Factor = 22

100

590 kHz < f 1.5 MHz

200 kHz < f 400 kHz

K Factor = 65

101

1.5 MHz < f 4 MHz

400 kHz < f 800 kHz

K Factor = 180

110

4 MHz < f 10 MHz

800 kHz < f 1.6 MHz

K Factor = 664

111

10 MHz < f 30 MHz

1.6 MHz < f 3.2 MHz

K Factor = 1590

CRYSTAL MODE (Circuit from Figure 14.1, Option 1; XOSCMD = 11x) Choose XFCN value to match crystal or resonator frequency.

RC MODE (Circuit from Figure 14.1, Option 2; XOSCMD = 10x) Choose XFCN value to match frequency range:

f = 1.23(103) / (R x C), where f = frequency of clock in MHz C = capacitor value in pF

R = Pull-up resistor value in k

C MODE (Circuit from Figure 14.1, Option 3; XOSCMD = 10x) Choose K Factor (KF) for the oscillation frequency desired: f = KF / (C x VDD), where

f = frequency of clock in MHz

C = capacitor value the XTAL2 pin in pF VDD = Power Supply on MCU in volts

Rev. 0.5

141

Page 141
Image 141
Silicon Laboratories C8051F344, C8051F347, C8051F346 SFR Definition 14.4. Oscxcn External Oscillator Control, Xfcn