| Electronic Components Datasheet Search |
|
AN1530 Datasheet(PDF) 2 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1530 Datasheet(HTML) 2 Page - STMicroelectronics |
|
2 / 12 page ![]() 2/12 ACCURATE TIMEBASE FOR LOW-COST ST7 APPLICATIONS WITH INTERNAL RC... 1 SOFTWARE SOLUTION 1.1 MEASUREMENT PRINCIPLE To measure the frequency of the internal RC, software uses the input capture pin of 16-bit TIMER A. A calibrated source is applied with 50Hz on the capture pin. Every falling edge on this pin generates an interrupt (at 20ms time duration). Software has taken the internal RC frequency of typically 4 MHz as per the datasheet. The TIMER clock is selected as fcpu/2 (1 MHz). Counter overflow is generated after 65.532 ms (0xFFFF). This internal RC frequency should be chosen between the datasheet. max. and min. RC frequency values. Capture1 and Capture2 are stored as shown in Figure 1. Figure 1. Timer Input Capture to measure the Reference frequency. Here two possibilities can occur during the calculation of the capture elapsed time. If Capture1 and Capture2 are on the single counter (as shown in Figure 1), time is calculated simply by Capture Counter = Capture2 - Capture1 Second possibility is that counter overflow generates between the measurement of the Capture1 and Capture2. This leads to a more complex calculation given by Capture Counter= ((0xffff - capture1) + capture2) This Measured Capture Counter is compared with the Ideal Capture Counter. Ideal Capture Counter is calculated manually and here for the fcpu = 2 MHz, it gives 0x4E20. With this infor- mation Internal RC deviation is found. FFFFh 0000h Calibrated source for 5 Vpp, 50 Hz Free running counter of TIMER A Capture1 Capture2 2 |
|
|
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 |