数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN1324 数据表(PDF) 2 Page - STMicroelectronics

部件名 AN1324
功能描述  CALIBRATING THE RC OSCILLATOR OF THE ST7FLITE0 MCU USING THE MAINS
PDF  15 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN1324 数据表(HTML) 2 Page - STMicroelectronics

  AN1324 Datasheet HTML 1Page - STMicroelectronics AN1324 Datasheet HTML 2Page - STMicroelectronics AN1324 Datasheet HTML 3Page - STMicroelectronics AN1324 Datasheet HTML 4Page - STMicroelectronics AN1324 Datasheet HTML 5Page - STMicroelectronics AN1324 Datasheet HTML 6Page - STMicroelectronics AN1324 Datasheet HTML 7Page - STMicroelectronics AN1324 Datasheet HTML 8Page - STMicroelectronics AN1324 Datasheet HTML 9Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 2 / 15 page
background image
2/15
CALIBRATING THE RC OSCILLATOR OF THE ST7FLITE0 MCU USING THE MAINS
1 CALIBRATION SOFTWARE
1.1 SOFTWARE PRINCIPLE
The software algorithm, described in the following flowchart (see Figure 3), uses the mains
frequency as a timebase. This timebase allows the microcontroller to test if the RC oscillator
frequency is above or below 1 MHz and repeatedly transforms it by dichotomous analysis so
that in 7 iterations the RCCR is set to the optimum value.
As the timer speed depends on the RC oscillator frequency, it is easy to determine if the oscil-
lator is too fast or too slow. The counted value can be obtained by the following equation:
Since the frequency of the counter is the frequency of the oscillator divided by 32, if the oscil-
lator is at 1 MHz, the result of the count between two edges (which have a 10 ms interval), is
138h for the European standard (220V/50Hz). For the US standard (110V/60Hz) the right
value is 104h. Since the goal of the software is to set the RC oscillator frequency to 1 MHz it
means obtaining 138h as the result of the count. So if the result of the count is greater than
138h, it means that the frequency is too high so the program increases the value of RCCR in
order to decrease the RC oscillator frequency. And if the result is less than 138h, the RCCR is
decreased in order to increase the RC oscillator frequency.
Figure 1. Dichotomous Analysis of RCCR Value
The RCCR register is set to 80h initially by the program, then the dichotomization starts by
adding or subtracting 40h and after each iteration the result is divided by two, so that after 7 it-
erations the value of RCCR is set with an accuracy of one bit.
countedvalue
f
cpu
32
f
mains
×
---------------------------
=
80h
Start Value
FFh
0h
increase oscillator
frequency
decrease oscillator
frequency
RCCR Register
2



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com