| Electronic Components Datasheet Search |
|
AN1530 Datasheet(PDF) 7 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1530 Datasheet(HTML) 7 Page - STMicroelectronics |
|
7 / 12 page ![]() 7/12 ACCURATE TIMEBASE FOR LOW-COST ST7 APPLICATIONS WITH INTERNAL RC... TR =Transmission rate divisor ETPR = Extended Transmit Prescaler Division The above equation is used normally without the ETPR selection. Due to the flexibility of ETPR range (1 to 255), this software solution calibrates the SCI baud rate using the ETPR register. Software keeps PR=1 and TR=1. Again the fraction is applied to the numerator of the equation as the variation affects the fcpu only. The equation becomes, To calibrate the baud rate, software loads the value of 9600 in Tx. This gives the value in terms of (PR * TR * ETPR). Software loads TR=PR=1, So the value is directly assigned to the ETPR register. This value is loaded into the PR, TR and ETPR bits. For the 9600 baud rate, this calibration gives ~9300 baud rate (where internal RC varies (-25%)). This software is able to communicate with the PC hyperterminal after using this calibration. Here for the 9600 baud rate calculation, ETPR = 13, PR = TR = 1, for fcpu = 2 MHz. When you convert into Hex value from decimal, resolution will be of 0.5 count. So the accuracy is [(0.5/ 13)*100] = 3.84%. Accuracy will be proportional to variations in Baud rate and same as that of the ETPR. For higher baud rate values, you have to go for a resolution 0.25 (logic can be ex- tended as shown in software) to achieve better accuracy. If SCI doesn’t have the ETPR prescaler then we can load PR=1 and assign the counted value to TR directly. 2 CONCLUSION This software solution allows you to work with any time critical applications irrespective of the variations of the internal RC oscillator frequency. Software is calibrated with reference to the base of 4 MHz. Software is developed using the ST7 software library functions. It takes less than 30ms for the simple calibration version. With the averaging and glitch algorithms, it takes less than 325 ms. Software includes correction for the PWM counter value and the SCI baud rate. The PWM counter value gives the frequency with an accuracy of 1-2% and the SCI baud rate gives an accuracy of 3-4% after using this calibration software, when internal RC oscillator varies by (- 25%). Tx fcpu fraction × 16 PR × () TR × ETPR × --------------------------------------------------------------- = |
|
|
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 |