STC8A8K64D4 Series Manual
-
6.2 STC8A8K64D4 series internal IRC frequency adjustment
All STC8A8K64D4 series of microcontrollers integrate a high-precision internal IRC oscillator. The ISP download
software will automatically adjust the frequency according to the frequency selected / set by the user when users download
user program using ISP. The general frequency value can be adjusted below 0.3%. The temperature drift of the adjusted
frequency can be -1.35% ~ 1.30% within the full temperature range (-40~85).
The internal IRC of the STC8A8K64D4 series has four frequency bands whose center frequencies are 6MHz, 10MHz,
27MHz and 44MHz respectively. The adjustment range of the 6M band is about 4.5MHz to 8MHz. The adjustment range of
the 10M band is about 7.5MHz to 13.5MHz. The adjustment range of the 27M band is about 20.5MHz to 36MHz. The
adjustment range of the 44M band is about 29MHz to 55MHz. Note: Different chips or different manufacturing batches may
have manufacturing errors of about 5%. It is recommended that users set the IRC frequency not higher than 45MHz during
ISP download.
Note: For general users, the adjustment of the internal IRC frequency can be ignored because the frequency
adjustment is automatically completed when the ISP is downloaded. Therefore, if the user does not need to adjust the
frequency by itself, the following four registers cannot be modified at will, otherwise the operating frequency may
change.
If the user needs to dynamically select the preset frequency of the chip in his own code, please refer to the preset
frequency list and the sample program of "User-Defined Internal IRC Frequency".
Internal IRC frequency adjustment is mainly adjusted using the following 4 registers.
Related registers
IRC band selection register
IRC frequency trim register
IRC frequency adjustment register
6.2.1 IRC band selection register (IRCBAND)
SEL[1:0]: band selection
00: Select 6MHz band
01: Select 10MHz band
10: Select 27MHz band
11: Select 44MHz band
6.2.2 Internal IRC Frequency Adjustment Register (IRTRIM)
IRTRIM[7:0]: Internal high-precision IRC frequency adjustment register
IRTRIM can adjust 256 levels of IRC frequency. The frequency value adjusted by each level is linearly distributed as a whole,
and there may be local fluctuations. Macroscopically, the frequency adjusted by each stage is about 0.24%, that is, the
frequency when the IRTRIM is (n + 1) is about 0.24% faster than the frequency when the IRTRIM is (n). However, not every
level of IRC frequency adjustment is 0.24% (the maximum value of the adjusted frequency of each level is about 0.55%, the
minimum value is about 0.02%, and the overall average value is about 0.24%), so it will cause local fluctuations.
6.2.3 Internal IRC frequency trim register (LIRTRIM)
LIRTRIM: Internal high precision IRC frequency trim register
6.2.4 Clock Divide Register (CLKDIV)