| Electronic Components Datasheet Search |
|
AFE8220TPZPQ1 Datasheet(PDF) 28 Page - Texas Instruments |
|
|
|
|||||||||||||||||||||||||||||
AFE8220TPZPQ1 Datasheet(HTML) 28 Page - Texas Instruments |
|
28 / 49 page ![]() Real-Time Clock Setting and Reading the RTC AFE8220-Q1 SBAS455A – JANUARY 2009 – REVISED JULY 2009....................................................................................................................................................... www.ti.com Table 13. RTC Control Register Setting PARAMETER ADDRESS BITS rtc_oe 1 12 The real-time clock (RTC) is enabled by setting rtc_en to 1. While rtc_en is 0, the RTC oscillator continues to run but the RTC registers do not advance. The RTC can operate with a range of oscillator frequencies up to 100 kHz. At the beginning of each second, two times the value of rtc_max_count is loaded into the RTC crystal counter. This counter is decremented at the rate of the RTC oscillator until it hits zero, which generates a strobe that increments the seconds counter as well as re-initializes the RTC crystal counter. For a nominal 32.768-kHz clock crystal, rtc_max_count should be set to 16,384 (the default value); for a nominal 100-kHz crystal, rtc_max_count should be set to 50,000. Table 15 illustrates the RTC control variable settings. The RTC can be coarsely calibrated by adjusting the rtc_max_count to an appropriate value other than half the nominal crystal frequency. If finer calibration is required, compensation mode can be enabled by setting rtc_comp_en to 1. In compensation mode, the two's-complement value stored in rtc_comp_val is added to the one-second counter when it is re-initialized at the beginning of each hour; thus, the first second of each hour is lengthened or shortened depending on the sign of rtc_comp_val. The compensation can be applied to several seconds at the beginning of each hour; rtc_comp_cnt holds the number of seconds per hour to which the compensation is applied. By spreading the compensation out over a number of seconds, the impact on the length of any given second is minimized. Because of the need to carefully synchronize any update of the RTC time registers (rtc_seconds, rtc_minutes, etc.), they must be written in a slightly different manner than the other control registers. Time registers must be written individually; after a particular register address is written, at least two clock cycles of the RTC oscillator must pass before another register write occurs. The MSB of each time register address can be polled to determine if it is safe to make another write: if the MSB is 1, the interface is still busy and a new write should not be initiated. If the MSB is 0, then the interface is ready to accept another write. There is no limitation on reading the time registers. Note that all time register values are BCD-encoded. Also note that the rtc_day_of_week is a read-only value that is internally calculated from the rtc_day, rtc_month, and rtc_year registers. Ranges on the various time registers are shown in Table 14. Table 14. Time Register Ranges PARAMETER RANGE rtc_seconds 0 to 59 rtc_minutes 0 to 59 0 to 12 (12-hour mode); rtc_hours 0 to 24 (24-hour mode) 0 (AM) or 1(PM) rtc_ampm 12-hour mode only rtc_day 1 to 31 rtc_month 1 to 12 0 to 99 rtc_year (for years 2000 to 2099) rtc_day_of_week 0 (Sunday) to 6 (Saturday) 28 Submit Documentation Feedback Copyright © 2009, Texas Instruments Incorporated Product Folder Link(s): AFE8220-Q1 |
|
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 |