AN934 STMICROELECTRONICS | Alldatasheet
Document overview
- Manufacturer or author: Provided By ALLDATASHEET.COM(FREE DATASHEET DOWNLOAD SITE)
- PDF pages: 14
Technical content
Datasheet sections
- It requires external components (trim capacitors); and
- it can increase oscillator cu rrent (an important factor in battery-supported applications).
Figure 1. Typical crystal accuracy pl otted against temperature (and against
- temperature variation
- crystal variation As mentioned previously, most clock chips compensate for crystal frequency and temperature shift error with cumbersome “trim” capacitors. The TIMEKEEPER design employs periodic counter correction. The digital calibration circuit adds or subtracts counts from the oscillator divider circuit at the 256 Hz stage (see Figure 2). Figure 3 shows how extra clock pulses are added (by clock splitting) or removed (by clock blanking). The number of times the pulses are split (added during positive calibration) or blanked (subtracted during negative calibration) depends upon the value that has been loaded into the least significant five bits of the control register. Adding counts speeds the clock up while subtracting counts slows the clock down.
Figure 2. Oscillator divider chain Figure 3. Clock splitting and clock blanking
64 Minute
Table 1. Calibration table: compensation values in seconds per month (30 days) and in ppm
access the calibration byte. seconds per month to +1 second per month. Figure 2. This signal can be used to measure the accuracy of the crystal oscillator. The
shows how the frequency error can be minimized over a given temperature range. Figure 5. Crystal accuracy over a temperature range
AN934 Calculating the calibration for multiple operating temperatures Doc ID 6393 Rev 4 9/14 Calculating the calibration for multiple operating temperatures For applications that spend significant time at more than one temperature, the following equation may be used to calculate the appropriate amount of calibration required: where: K = Curvature characteristic = –0.036 ppm/°C 2 ± 0.006 ppm/°C2 acc = Accuracy, in ppm, of the frequency, at the turnover temperature T O = Turnover temperature, in degrees Celsius = 25°C ± 5°C Ti = Working temperature, in degrees Celsius tPERi = Amount of time it is in the temperature range (in seconds) t = Amount of time lost during tPERi N = Number of temperature ranges Consider a piece of portable equipment used outdoors for 8 hours per day, then stored at room temperature for the remainder of the day. The equation below calculates the calibration value at –20°C for a period of 8 hours and then room temperature for the rest of the day for a device that is currently in error by +5 ppm at room temperature: The unit is losing 1.67 seconds per day (or 50 seconds per month). The appropriate sign bit in this case is a logical “1,” indicating the clock needs to be sped up to compensate for the lost time. This yields a calibration value of “100101.” t N Σ i1= tPERi acc K T i To–() 2×+() 10 6–×= 8hours 28800 ondssec= 16hours 57600 ondssec= 10 6–× t1 . 6 7– ssec day⁄=
Table 2. 512 Hz output pin
Software calibration is a convenient feature which allows the user to adjust the clock accuracy during manufacturing (or later) at minimal cost. This feature also provides a method whereby “drift” (due to temperature variation) can be corrected and/or anticipated. See http://www.st.com for additional details as well as an online calibration calculation tool.
Revision history
Table 3. Document revision history