Electronic Components Datasheet Search
  English  ▼

X  

AN2326 Datasheet(PDF) 4 Page - STMicroelectronics

Part # AN2326
Description  Calibrating the RC oscillator of the ST7ULTRALITE MCU using the mains
PDF  20 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2326 Datasheet(HTML) 4 Page - STMicroelectronics

  AN2326 Datasheet HTML 1Page - STMicroelectronics AN2326 Datasheet HTML 2Page - STMicroelectronics AN2326 Datasheet HTML 3Page - STMicroelectronics AN2326 Datasheet HTML 4Page - STMicroelectronics AN2326 Datasheet HTML 5Page - STMicroelectronics AN2326 Datasheet HTML 6Page - STMicroelectronics AN2326 Datasheet HTML 7Page - STMicroelectronics AN2326 Datasheet HTML 8Page - STMicroelectronics AN2326 Datasheet HTML 9Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 4 / 20 page
background image
Obsolete
Product(s)
- Obsolete
Product(s)
Obsolete
Product(s)
- Obsolete
Product(s)
Calibration software
AN2326
4/20
Figure 2.
Using the timer input capture to measure the mains frequency
To measure the frequency, the software uses the Lite Timer input capture (LTIC) so that on
each edge of the mains the value of the free running counter is stored as shown in Figure 2..
Then the microcontroller calculates the elapsed time between the two edges of the mains.
This time is given by the following equation:
where nbover represents the number of counter overflows during the measurement, capture
1 and capture 2 are the values captured on the free running counter when an edge occurs
on the mains and F9h is the overflow value of the free running counter.
If the RC oscillator frequency is equal to 1 MHz, the result time will be 138h for European
standard (220V/50Hz) or 104h for US standard mains (110V/60Hz), so these are the
reference values.
This measurement result is compared to the reference value and, depending on the result of
the comparison, the microcontroller adds to or subtracts from the current RCCR/SICSR
register values.
1.2
Basic version
In this version the measurement is done only once for each dichotomization step. This
allows the calibration software to be light and fast. It requires only 128 bytes of program
memory and 5 bytes of RAM during calibration. The calibration takes less than 200 ms to be
completed.
The software works as shown in the following flowchart. The assembly code and a more
detailed flowchart can be found in Section 4.
Free-running
Counter
Mains
Capture 1
Capture 2
Overflow
0h
F9h
time
nbover
F9h
capture2
capture1
–
+
×
=



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
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