| Electronic Components Datasheet Search |
|
AN2326 Datasheet(PDF) 4 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN2326 Datasheet(HTML) 4 Page - STMicroelectronics |
|
4 / 20 page ![]() 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 – + × = |
|
|
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 |
| 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 |