
Equation 13.1. Typical Change in Internal Oscillator Period with OSCICL
T 0.0025
1
f
BASE
-------------
OSCICL
On C8051F320/1 devices, OSCICL is factory calibrated to obtain a 12 MHz base frequency (f
BASE
). Sec-
tion 13.1.1 details oscillator programming for C8051F320/1 devices. Electrical
specifications for the preci-
sion internal oscillator are given in Table 13.3 on page 125. Note that the system clock may be derived
from the programmed internal oscillator divided by 1, 2, 4, or 8, as defined by the IFCN
bits in register
OSCICN. The divide value defaults to 8 following a reset.
The OSCICL reset value is factory calibrated to result in a 12 MHz internal os
cillator with a ±1.5% accu-
racy; this frequency is suitable for us
e as the USB clock (see Section 13.4). Software may modify the fre-
quency of the internal oscillator as described below.
Important Note: Once
the internal oscillator frequency has been modified, the internal oscillator may not
be used as the USB clock as described in Section 13.4. The internal oscillator frequency will reset to it
s
original factory-calibrated frequency following any device
reset, at which point the oscillator is suitable for
use as the USB clock.
Software should read and adjust the value of OSCICL according to Equation 13.1 to obtain the desired fre-
quency. The example below shows how to obtain an 11.6 MHz internal oscillator frequency.
f
BASE
is the internal oscillator reset frequency; T
BASE
is the reset oscillator period.
f
DES
is the desired internal oscillator frequency; T
DES
is the desired oscillator period.
The required change in period (T
DES
) is the difference between the base period and the desired period.
Using Equation 13.1 and the above calculations, find OSCICL:
OSCICL is rounded to the nearest integer (14) and added to the reset value of register OSCICL.
f
BASE
12000000Hz=
T
BASE
1
12000000
------------------------
s=
f
DES
11600000Hz=
T
DES
1
11600000
------------------------
s=
T
DES
1
11600000
------------------------
1
12000000
------------------------
– 2.87 10
9–
s==
2.87 10
9–
0.0025
1
f
BASE
-------------
OSCICL=
OSCICL 13.79=
Rev. 1.4 117
C8051F320/1
13.1.1. Programming the Internal Oscillator on C8051F320/1 Devices