Using the DS87C530/DS5250 Real
[09-13 17:03:26] 来源:http://www.88dzw.com 控制技术 阅读:8357次
文章摘要:Although the DS87C530 RTC is designed to oscillate at exactly 32.768kHz, variations in the device, crystal, temperature, and board layout can produce minor timing variations. By adjusting the RTC Trim Bits located in the RTC Trim Register (TRIM;96h), the internal capacitance of the RTC circuitry can
Using the DS87C530/DS5250 Real,标签:计算机控制技术,工厂电气控制技术,http://www.88dzw.comAlthough the DS87C530 RTC is designed to oscillate at exactly 32.768kHz, variations in the device, crystal, temperature, and board layout can produce minor timing variations. By adjusting the RTC Trim Bits located in the RTC Trim Register (TRIM;96h), the internal capacitance of the RTC circuitry can be slightly adjusted to improve timing accuracy beyond the minimum specified. Although the trim bits do not correspond to an absolute value of capacitance or frequency shift, they provide a relative adjustment.
Please note that under normal circumstances, adjusting the RTC Trim Bits is not necessary. Upon a no-battery reset, the DS87C530 will reset its internal capacitance to a default value which will guarantee the minimum accuracy specified. If you do not require accuracy better than 2 minutes per month, please skip this section.
To aid the user in determining the true frequency of the RTC, a 4096Hz signal derived from the 32.768kHz crystal is available on the P1.7 pin by setting the E4K bit (TRIM.7). This can be measured with a frequency counter to determine the RTC frequency. Do not attempt to measure the frequency of the RTC at the leads of the crystal. The capacitance of oscilloscope probes will distort the operation of the crystal and report erroneous values. The error of the RTC in minutes per month can be calculated from the following formula:
(P1.7 Frequency - 4096.000Hz)*(10.547) [minutes/month]
Note that this error is calculated at a specific temperature and voltage. Crystal characteristics change over temperature, and the designer is advised to characterize the error over the system's range of expected operating conditions.
The trim register features extensive protection to avoid accidental corruption. All of the bits of the trim register require a Timed Access procedure to modify them. In addition, writes to the trim register must be done in complementary pairs. Each of the three trim bits has a complement bit which must be set simultaneously. This is to ensure that any writes to the TRIM register are intentional. If an invalid bit sequence is written to the trim bits, the TRIM register will reset to 0x100101 binary. This is the no-battery reset value, except that the X12/6 bit will remain unchanged. The settings of the TRIM bits do not correspond to an absolute value of capacitance or frequency, and are only used to provide a relative adjustment.
To adjust the RTC trim bits, place the device into the target system with the selected crystal and remove any sources of loading from P1.7. Then attach a frequency counter to P1.7 and perform the following procedure.
- Perform a Timed Access procedure
- Set TRIM.7, E4K, and modify the TRMx bits, writing their complements to the TRMx bits in the same instruction. This will enable the external 4096Hz signal on P1.7.
- Record the frequency
- Repeat steps 1-3 eight times until all combinations of TRM0, TRM1, TRM2 have been measured.
Program Example: RTC Calibration
The following program example is provided to assist system designers in calibrating their RTC for maximum accuracy. It demonstrates how to set the RTC trim bits and pause the program to allow time to read the frequency output on P1.7.上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页
Tag:控制技术,计算机控制技术,工厂电气控制技术,控制技术
《Using the DS87C530/DS5250 Real》相关文章
- › 利用液晶的MAXQ微控制器-Using an LCD wit
- › Using Timers in the MAXQ Famil
- › Using Analog Temperature Senso
- › Using the DS87C530/DS5250 Real
- 在百度中搜索相关文章:Using the DS87C530/DS5250 Real
- 在谷歌中搜索相关文章:Using the DS87C530/DS5250 Real
- 在soso中搜索相关文章:Using the DS87C530/DS5250 Real
- 在搜狗中搜索相关文章:Using the DS87C530/DS5250 Real
分类导航
最新更新