Rev. 1.2
137
C8051T620/1/6/7 & C8051T320/1/2/3
SFR Address = 0xB1
SFR Definition 21.6. OSCXCN: External Oscillator Control
Bit
7
6
5
4
3
2
1
0
Name
XCLKVLD
XOSCMD[2:0]
-
XFCN[2:0]
Type
R
R/W
R
R/W
Reset
0
0
0
0
0
0
0
0
Bit
Name
Function
7
XCLKVLD
External Oscillator Valid Flag.
Provides External Oscillator status and is valid at all times for all modes of opera-
tion except External CMOS Clock Mode and External CMOS Clock Mode with
divide by 2. In these modes, XCLKVLD always returns 0.
0: External Oscillator is unused or not yet stable.
1: External Oscillator is running and stable.
6:4
XOSCMD[2:0]
External Oscillator Mode Select.
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.
3
Unused
Read = 0; Write = Don’t Care
2:0
XFCN[2:0]
External Oscillator Frequency Control Bits.
Set according to the desired frequency for RC mode.
Set according to the desired K Factor for C mode.
XFCN
Crystal Mode
RC Mode
C Mode
000
f
20 kHz
f
25 kHz
K Factor = 0.87
001
20 kHz
f
58 kHz
25 kHz
f
50 kHz
K Factor = 2.6
010
58 kHz
f
155 kHz
50 kHz
f
100 kHz
K Factor = 7.7
011
155 kHz
f
415 kHz
100 kHz
f
200 kHz
K Factor = 22
100
415 kHz
f
1.1 MHz
200 kHz
f
400 kHz
K Factor = 65
101
1.1 MHz
f
3.1 MHz
400 kHz
f
800 kHz
K Factor = 180
110
3.1 MHz
f
8.2 MHz
800 kHz
f
1.6 MHz
K Factor = 664
111
8.2 MHz
f
25 MHz
1.6 MHz
f
3.2 MHz
K Factor = 1590