0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
DS3232SN#T

DS3232SN#T

  • 厂商:

    AD(亚德诺)

  • 封装:

    SOIC20_300MIL

  • 描述:

    极其精确的 I2C RTC,集成晶体和静态存储器

  • 数据手册
  • 价格&库存
DS3232SN#T 数据手册
EVALUATION KIT AVAILABLE DS3232 LE AVAILAB Extremely Accurate I2C RTC with Integrated Crystal and SRAM General Description Features The DS3232 is a low-cost temperature-compensated crystal oscillator (TCXO) with a very accurate, temperature-compensated, integrated real-time clock (RTC) and 236 bytes of battery-backed SRAM. Additionally, the DS3232 incorporates a battery input and maintains accurate timekeeping when main power to the device is interrupted. The integration of the crystal resonator enhances the long-term accuracy of the device as well as reduces the piece-part count in a manufacturing line. The DS3232 is available in commercial and industrial temperature ranges, and is offered in an industry-standard 20-pin, 300-mil SO package. ♦ Accuracy ±2ppm from 0°C to +40°C ♦ Accuracy ±3.5ppm from -40°C to +85°C ♦ Battery Backup Input for Continuous Timekeeping ♦ Operating Temperature Ranges Commercial: 0°C to +70°C Industrial: -40°C to +85°C ♦ 236 Bytes of Battery-Backed SRAM ♦ Low-Power Consumption ♦ Real-Time Clock Counts Seconds, Minutes, Hours, Day, Date, Month, and Year with Leap Year Compensation Valid Up to 2099 ♦ Two Time-of-Day Alarms ♦ Programmable Square-Wave Output ♦ Fast (400kHz) I2C Interface ♦ 3.3V Operation ♦ Digital Temp Sensor Output: ±3°C Accuracy ♦ Register for Aging Trim ♦ RST Input/Output ♦ 300-Mil, 20-Pin SO Package ♦ Underwriters Laboratories Recognized The RTC maintains seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator. Two programmable time-ofday alarms and a programmable square-wave output are provided. Address and data are transferred serially through an I2C bidirectional bus. A precision temperature-compensated voltage reference and comparator circuit monitors the status of VCC to detect power failures, to provide a reset output, and to automatically switch to the backup supply when necessary. Additionally, the RST pin is monitored as a pushbutton input for generating a µP reset. Ordering Information PART DS3232S# DS3232SN# Applications Functional Diagrams Utility Power Meters Servers Telematics GPS TEMP RANGE 0°C to +70°C 20 SO DS3232 20 SO DS3232N #Denotes a RoHS-compliant device that may include lead that is exempt under the RoHS requirements. Lead finish is JESD97 Category e3, and is compatible with both lead-based and lead-free soldering processes. A "#" anywhere on the top mark denotes a RoHS-compliant device. VCC RPU VCC SCL SDA RST SCL SDA RST μP RPU PUSHBUTTON RESET N.C. N.C. N.C. N.C. N.C. N.C. DS3232 GND Pin Configuration TOP VIEW VCC VCC TOP MARK -40°C to +85°C Typical Operating Circuit RPU = tR / CB PINPACKAGE N.C. 1 20 SCL N.C. 2 19 N.C. 32kHz 3 18 SCL INT/SQW VCC 4 32kHz VBAT INT/SQW 5 N.C. N.C. N.C. N.C. N.C. Pin Configurations appear at end of data sheet. Functional Diagrams continued at end of data sheet. UCSP is a trademark of Maxim Integrated Products, Inc. 17 SDA DS3232 16 VBAT RST 6 15 GND N.C. 7 14 N.C. N.C. 8 13 N.C. N.C. 9 12 N.C. N.C. 10 11 N.C. SO For pricing, delivery, and ordering information, please contact Maxim Direct at 1-888-629-4642, or visit Maxim’s website at www.maximintegrated.com. 19-5337; Rev 5; 7/10 DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM ABSOLUTE MAXIMUM RATINGS Voltage Range on VCC, VBAT, 32kHz, SCL, SDA, RST, INT/SQW Relative to Ground.............................-0.3V to +6.0V Junction-to-Ambient Thermal Resistance (θJC) (Note 1)..55.1°C/W Junction-to-Case Thermal Resistance (θJC) (Note 1)..........24°C/W Operating Temperature Range (noncondensing) .............................................-40°C to +85°C Junction Temperature ......................................................+125°C Storage Temperature Range ...............................-40°C to +85°C Lead Temperature (soldering, 10s) .................................+260°C Soldering Temperature (reflow, 2 times max) ....................+260°C (See the Handling, PC Board Layout, and Assembly section.) Note 1: Package thermal resistances were obtained using the method described in JEDEC specification JESD51-7, using a fourlayer board. For detailed information on package thermal considerations, refer to www.maxim-ic.com/thermal-tutorial. Stresses beyond those listed under “Absolute Maximum Ratings” may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of the specifications is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability. RECOMMENDED OPERATING CONDITIONS (TA = -40°C to +85°C, unless otherwise noted.) (Notes 2, 3) PARAMETER MIN TYP MAX VCC 2.3 3.3 5.5 VBAT 2.3 3.0 5.5 Logic 1 Input SDA, SCL VIH 0.7 x VCC VCC + 0.3 V Logic 0 Input SDA, SCL VIL -0.3 +0.3 x VCC V Supply Voltage SYMBOL CONDITIONS UNITS V ELECTRICAL CHARACTERISTICS (VCC = 2.3V to 5.5V, VCC = active supply (see Table 1), TA = -40°C to +85°C, unless otherwise noted.) (Typical values are at VCC = 3.3V, VBAT = 3.0V, and TA = +25°C, unless otherwise noted.) (Notes 2, 3) PARAMETER Active Supply Current Standby Supply Current Temperature Conversion Current Power-Fail Voltage SYMBOL CONDITIONS ICCA 32kHz output off (Notes 4, 5) ICCS I2C bus inactive, 32kHz output off, SQW output off (Note 5) ICCSCONV I2C bus inactive, 32kHz output off, SQW output off VPF MIN TYP MAX VCC = 3.3V 200 VCC = 5.5V 325 VCC = 3.3V 120 VCC = 5.5V 160 VCC = 3.3V 500 VCC = 5.5V 600 UNITS µA µA 2.45 2.575 2.70 µA V ACTIVE SUPPLY (Table 1 ) (2.3V to 5.5V, TA = -40°C to +85°C, unless otherwise noted) (Note 2) Logic 1 Output, 32kHz IOH = -1mA IOH = -0.75mA IOH = -0.14mA 2 VOH Active supply > 3.3V, 3.3V > active supply > 2.7V, 2.7V > active supply > 2.3V 2.0 V Maxim Integrated DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM ELECTRICAL CHARACTERISTICS (continued) (VCC = 2.3V to 5.5V, VCC = active supply (see Table 1), TA = -40°C to +85°C, unless otherwise noted.) (Typical values are at VCC = 3.3V, VBAT = 3.0V, and TA = +25°C, unless otherwise noted.) (Notes 2, 3) MAX UNITS Logic 0 Output, INT/SQW, SDA PARAMETER SYMBOL VOL IOL = 3mA 0.4 V Logic 0 Output, RST, 32kHz VOL IOL = 1mA 0.4 V Output Leakage Current 32kHz, INT/SQW, SDA ILO Output high impedance +1 µA -1 +1 µA -200 +10 µA Input Leakage SCL ILI RST Pin I/O Leakage IOL CONDITIONS MIN -1 RST high impedance (Note 6) TYP 0 TCXO Output Frequency fOUT Duty Cycle (Revision A3 Devices) VCC = 3.3V or VBAT = 3.3V 32.768 2.97V ≤ VCC < 3.63 0°C to +40°C Frequency Stability vs. Temperature Frequency Stability vs. Voltage Δf/fOUT Δf/V VCC = 3.3V or VBAT = 3.3V -40°C to 0°C and +40°C to +85°C 31 69 -2 +2 -3.5 +3.5 VCC = 3.3V or VBAT = 3.3V Trim Register Frequency Sensitivity per LSB Δf/LSB Specified at: Temperature Accuracy Temp VCC = 3.3V or VBAT = 3.3V 1 -40°C 0.7 +25°C 0.1 +70°C 0.4 +85°C Crystal Aging Δf/f0 After reflow, not production tested kHz % ppm ppm/V ppm 0.8 -3 +3 First year ±1.0 0–10 years ±5.0 °C ppm ELECTRICAL CHARACTERISTICS (VCC = 0V, VBAT = 2.3V to 5.5V, TA = -40°C to +85°C, unless otherwise noted.) (Note 2) PARAMETER Active Battery Current (Note 5) Timekeeping Battery Current (Note 5) Temperature Conversion Current Data-Retention Current Maxim Integrated SYMBOL CONDITIONS IBATA EOSC = 0, BBSQW = 0, SCL = 400kHz, BB32kHz = 0 IBATT EOSC = 0, BBSQW = 0, SCL = SDA = 0V, BB32kHz = 0, CRATE0 = CRATE1 = 0 IBATTC IBATTDR MIN TYP MAX VBAT = 3.3V 80 VBAT = 5.5V 200 VBAT = 3.4V 1.5 2.5 VBAT = 5.5V 1.5 3.0 UNITS µA µA EOSC = 0, BBSQW = 0, SCL = SDA = 0V 600 µA EOSC = 1, SCL = SDA = 0V, +25°C 100 nA 3 DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM AC ELECTRICAL CHARACTERISTICS (Active supply (see Table 1) = 2.3V to 5.5V, TA = -40°C to +85°C, unless otherwise noted.) (Note 2) PARAMETER SYMBOL SCL Clock Frequency fSCL Bus Free Time Between STOP and START Conditions tBUF Hold Time (Repeated) START Condition (Note 7) tHD:STA Low Period of SCL Clock tLOW High Period of SCL Clock tHIGH Data Hold Time (Notes 8, 9) tHD:DAT Data Setup Time (Note 10) tSU:DAT Start Setup Time tSU:STA CONDITIONS MIN TYP MAX Fast mode 100 400 Standard mode 0.04 100 Fast mode 1.3 Standard mode 4.7 Fast mode 0.6 Standard mode 4.0 Fast mode 1.3 25,000 Standard mode 4.7 25,000 Fast mode 0.6 Standard mode 4.0 µs 0 0.9 0 0.9 100 250 Fast mode 0.6 Standard mode 4.7 Fast mode µs µs Standard mode Standard mode kHz µs Fast mode Fast mode UNITS µs ns µs 300 Rise Time of Both SDA and SCL Signals (Note 11) tR Fall Time of Both SDA and SCL Signals (Note 11) tF Setup Time for STOP Condition tSU:STO Capacitive Load for Each Bus Line (Note 11) CB Capacitance for SDA, SCL CI/O 10 pF Pulse Width of Spikes That Must Be Suppressed by the Input Filter tSP 30 ns Pushbutton Debounce tIF Reset Active Time tRST Temperature Conversion Time Fast mode Standard mode 20 + 0.1CB tOSF 1000 300 20 + 0.1CB Fast mode 0.6 Standard mode 4.7 300 250 (Note 12) 25 (Note 13) ns pF ms 35 250 ms ms 100 tCONV ns µs 400 PBDB Interface Timeout Oscillator Stop Flag (OSF) Delay Standard mode ms 125 200 ms TYP MAX UNITS POWER-SWITCH CHARACTERISTICS (TA = -40°C to +85°C) PARAMETER CONDITIONS MIN tVCCF 300 µs VCC Rise Time; VPF(MIN) to VPF(MAX) tVCCR 0 µs Recovery at Power-Up 4 SYMBOL VCC Fall Time; VPF(MAX) to VPF(MIN) tREC (Note 14) 125 300 ms Maxim Integrated DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Pushbutton Reset Timing RST PBDB tRST Power-Switch Timing VCC VPF(MAX) VPF VPF(MIN) tVCCF VPF tVCCR tREC RST Maxim Integrated 5 DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Data Transfer on I2C Serial Bus SDA tBUF tF tHD:STA tLOW tSP SCL tHIGH tHD:STA tHD:DAT STOP tSU:STA tR START tSU:STO tSU:DAT REPEATED START NOTE: TIMING IS REFERENCED TO VIL(MAX) AND VIH(MIN). WARNING: Negative undershoots below -0.3V while the part is in battery-backed mode may cause loss of data. Limits at -40°C are guaranteed by design and not production tested. All voltages are referenced to ground. ICCA—SCL clocking at max frequency = 400kHz. Current is the averaged input current, which includes the temperature conversion current. The RST pin has an internal 50kΩ (nominal) pullup resistor to VCC. After this period, the first clock pulse is generated. A device must internally provide a hold time of at least 300ns for the SDA signal (referred to the VIH(MIN) of the SCL signal) to bridge the undefined region of the falling edge of SCL. Note 9: The maximum tHD:DAT needs only to be met if the device does not stretch the low period (tLOW) of the SCL signal. Note 10: A fast-mode device can be used in a standard-mode system, but the requirement tSU:DAT ≥ 250ns must then be met. This is automatically the case if the device does not stretch the low period of the SCL signal. If such a device does stretch the low period of the SCL signal, it must output the next data bit to the SDA line tR(MAX) + tSU:DAT = 1000 + 250 = 1250ns before the SCL line is released. Note 11: CB—total capacitance of one bus line in pF. Note 12: Minimum operating frequency of the I2C interface is imposed by the timeout period. Note 13: The parameter tOSF is the period of time the oscillator must be stopped for the OSF flag to be set over the voltage range of 0V ≤ VCC ≤ VCC(MAX) and 2.3V ≤ VBAT ≤ 3.4V. Note 14: This delay only applies if the oscillator is enabled and running. If the EOSC bit is 1, tREC is bypassed and RST immediately goes high. Note 2: Note 3: Note 4: Note 5: Note 6: Note 7: Note 8: 6 Maxim Integrated DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Typical Operating Characteristics (VCC = +3.3V, TA = +25°C, unless otherwise noted.) STANDBY SUPPLY CURRENT vs. SUPPLY VOLTAGE SUPPLY CURRENT vs. SUPPLY VOLTAGE RST ACTIVE SUPPLY CURRENT (nA) 50 900 850 800 750 0 700 2.3 2.8 3.3 3.8 4.3 4.8 5.3 2.3 2.8 3.3 3.8 4.3 4.8 VCC (V) VBAT (V) SUPPLY CURRENT vs. TEMPERATURE FREQUENCY DEVIATION vs. TEMPERATURE vs. AGING 75 DS3232 toc03 0.900 VCC = 0V BB32kHz = 0 FREQUENCY DEVIATION (ppm) VBAT = 3.4V 5.3 0.800 VBAT = 3.0V 0.700 0.600 65 55 45 DS3232 toc04 SUPPLY CURRENT (nA) 75 25 SUPPLY CURRENT (μA) VCC = 0V BB32kHz = 0 BBSQW = 0 BSY = 0 950 100 DS3232 toc02 SCL = SDA = VCC 125 1000 DS3232 toc01 150 AGING = -128 AGING = -33 35 25 15 AGING = 0 5 -5 -15 -25 -35 AGING = +127 AGING = +32 -45 -40 -20 0 20 40 TEMPERATURE (°C) 60 80 -40 -20 0 20 40 TEMPERATURE (°C) 60 80 DELTA TIME AND FREQUENCY vs. TEMPERATURE DS3232 toc05 20 DELTA FREQUENCY (ppm) -40 -60 -80 CRYSTAL +20ppm -20 TYPICAL CRYSTAL, UNCOMPENSATED -100 -120 -140 CRYSTAL -20ppm DS3232 ACCURACY BAND -40 -60 DELTA TIME (MIN/YEAR) 0 0 -20 -80 -160 -180 -100 -200 -40 -30 -20 -10 0 10 20 30 40 50 60 70 80 TEMPERATURE (°C) Maxim Integrated 7 DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Block Diagram 32kHz X1 OSCILLATOR AND CAPACITOR ARRAY INT/SQW CONTROL LOGIC/ DIVIDER X2 SQUARE-WAVE BUFFER; INT/SQW CONTROL N VCC VOLTAGE REFERENCE; DEBOUNCE CIRCUIT; PUSHBUTTON RESET DS3232 RST N VCC VBAT POWER CONTROL TEMPERATURE SENSOR CONTROL AND STATUS REGISTERS GND SRAM SCL I2C INTERFACE AND ADDRESS REGISTER DECODE SDA USER BUFFER (7 BYTES) Detailed Description The DS3232 is a serial RTC driven by a temperaturecompensated 32kHz crystal oscillator. The TCXO provides a stable and accurate reference clock, and maintains the RTC to within ±2 minutes per year accuracy from -40°C to +85°C. The TCXO frequency output is available at the 32kHz pin. The RTC is a low-power clock/calendar with two programmable time-of-day alarms and a programmable square-wave output. The INT/SQW provides either an interrupt signal due to 8 CLOCK AND CALENDAR REGISTERS alarm conditions or a square-wave output. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator. The internal registers are accessible though an I2C bus interface. A temperature-compensated voltage reference and comparator circuit monitors the level of VCC to detect Maxim Integrated DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Pin Description PIN NAME 1, 2, 7–14, 19 FUNCTION N.C. 3 32kHz 32kHz Push-Pull Output. If disabled with either EN32kHz = 0 or BB32kHz = 0, the state of the 32kHz pin will be low. 4 VCC DC Power Pin for Primary Power Supply. This pin should be decoupled using a 0.1μF to 1.0μF capacitor. No Connection. Not connected internally. Must be connected to ground. 5 Active-Low Interrupt or Square-Wave Output. This open-drain pin requires an external pullup resistor. It can be left open if not used. This multifunction pin is determined by the state of the INTCN bit in the Control Register (0Eh). When INTCN is set to logic 0, this pin outputs a square wave and its frequency is determined by RS2 and RS1 bits. When INTCN is set to logic 1, then a match between the timekeeping INT/SQW registers and either of the alarm registers activates the INT/SQW pin (if the alarm is enabled). Because the INTCN bit is set to logic 1 when power is first applied, the pin defaults to an interrupt output with alarms disabled. The pullup voltage can be up to 5.5V, regardless of the voltage on VCC. If not used, this pin can be left unconnected. 6 RST Active-Low Reset. This pin is an open-drain input/output. It indicates the status of VCC relative to the VPF specification. As VCC falls below VPF, the RST pin is driven low. When VCC exceeds VPF, for tRST, the RST pin is driven high impedance. The active-low, open-drain output is combined with a debounced pushbutton input function. This pin can be activated by a pushbutton reset request. It has an internal 50k nominal value pullup resistor to VCC. No external pullup resistors should be connected. If the crystal oscillator is disabled, tRST is bypassed and RST immediately goes high. 15 GND Ground 16 VBAT Backup Power-Supply Input. When using the device with the VBAT input as the primary power source, this pin should be decoupled using a 0.1μF to 1.0μF low-leakage capacitor. When using the device with the VBAT input as the backup power source, the capacitor is not required. If VBAT is not used, connect to ground. The device is UL recognized to ensure against reverse charging when used with a primary lithium battery. Go to www.maxim-ic.com/qa/info/ul. 17 SDA Serial-Data Input/Output. This pin is the data input/output for the I2C serial interface. This open-drain pin requires an external pullup resistor. The pullup voltage can be up to 5.5V, regardless of the voltage on VCC. SCL Serial-Clock Input. This pin is the clock input for the I2C serial interface and is used to synchronize data movement on the serial interface. A connection to only one of the pins is required. The other pin must be connected to the same signal or be left unconnected. Up to 5.5V can be used for this pin, regardless of the voltage on VCC. 18, 20 power failures and to automatically switch to the backup supply when necessary. The RST pin provides an external pushbutton function and acts as an indicator of a power-fail event. Also available are 236 bytes of general-purpose battery-backed SRAM. Operation The block diagram shows the main elements of the DS3232. The eight blocks can be grouped into four functional groups: TCXO, power control, pushbutton function, and RTC. Their operations are described separately in the following sections. Maxim Integrated 32kHz TCXO The temperature sensor, oscillator, and control logic form the TCXO. The controller reads the output of the on-chip temperature sensor and uses a lookup table to determine the capacitance required, adds the aging correction in AGE register, and then sets the capacitance selection registers. New values, including changes to the AGE register, are loaded only when a change in the temperature value occurs. The temperature is read on initial application of VCC and once every 64 seconds (default, see the description for CRATE1 and CRATE0 in the control/status register) afterwards. 9 DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Power Control This function is provided by a temperature-compensated voltage reference and a comparator circuit that monitors the VCC level. When VCC is greater than VPF, the part is powered by VCC. When VCC is less than VPF but greater than VBAT, the DS3232 is powered by VCC. If V CC is less than V PF and is less than V BAT , the device is powered by VBAT. See Table 1. Table 1. Power Control SUPPLY CONDITION POWERED BY VCC < VPF, VCC < VBAT VBAT VCC < VPF, VCC > VBAT VCC VCC > VPF, VCC < VBAT VCC VCC > VPF, VCC > VBAT VCC After the internal timer has expired (PBDB), the DS3232 continues to monitor the RST line. If the line is still low, the DS3232 continuously monitors the line looking for a rising edge. Upon detecting release, the DS3232 forces the RST pin low and holds it low for tRST. The same pin, RST, is used to indicate a power-fail condition. When VCC is lower than VPF, an internal powerfail signal is generated, which forces the RST pin low. When VCC returns to a level above VPF, the RST pin is held low for tREC to allow the power supply to stabilize. If the oscillator is not running (see the Power Control section) when VCC is applied, tREC is bypassed and RST immediately goes high. Assertion of the RST output, whether by pushbutton or power-fail detection, does not affect the internal operation of the DS3232. Real-Time Clock To preserve the battery, the first time VBAT is applied to the device, the oscillator does not start up and no temperature conversions take place until VCC exceeds VPF or until a valid I2C address is written to the part. After the first time VCC is ramped up, the oscillator starts up and the V BAT source powers the oscillator during power-down and keeps the oscillator running. When the DS3232 switches to VBAT, the oscillator may be disabled by setting the EOSC bit. VBAT Operation There are several modes of operation that affect the amount of VBAT current that is drawn. While the device is powered by VBAT and the serial interface is active, active battery current, IBATA, is drawn. When the serial interface is inactive, timekeeping current (IBATT), which includes the averaged temperature conversion current, IBATTC, is used (refer to Application Note 3644: Power Considerations for Accurate Real-Time Clocks for details). Temperature conversion current, IBATTC, is specified since the system must be able to support the periodic higher current pulse and still maintain a valid voltage level. Data retention current, IBATTDR, is the current drawn by the part when the oscillator is stopped (EOSC = 1). This mode can be used to minimize battery requirements for times when maintaining time and date information is not necessary, e.g., while the end system is waiting to be shipped to a customer. Pushbutton Reset Function The DS3232 provides for a pushbutton switch to be connected to the RST output pin. When the DS3232 is not in a reset cycle, it continuously monitors the RST signal for a low going edge. If an edge transition is detected, the DS3232 debounces the switch by pulling the RST low. 10 With the clock source from the TCXO, the RTC provides seconds, minutes, hours, day, date, month, and year information. The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator. The clock provides two programmable time-of-day alarms and a programmable square-wave output. The INT/SQW pin either generates an interrupt due to alarm condition or outputs a square-wave signal and the selection is controlled by the bit INTCN. SRAM The DS3232 provides 236 bytes of general-purpose battery-backed read/write memory. The I2C address ranges from 14h to 0FFh. The SRAM can be written or read whenever VCC or VBAT is greater than the minimum operating voltage. Address Map Figure 1 shows the address map for the DS3232 timekeeping registers. During a multibyte access, when the address pointer reaches the end of the register space (0FFh), it wraps around to location 00h. On an I 2C START or address pointer incrementing to location 00h, the current time is transferred to a second set of registers. The time information is read from these secondary registers, while the clock may continue to run. This eliminates the need to reread the registers in case the main registers update during a read. I2C Interface The I2C interface is accessible whenever either VCC or VBAT is at a valid level. If a microcontroller connected to the DS3232 resets because of a loss of VCC or other Maxim Integrated DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Figure 1. Address Map for DS3232 Timekeeping Registers and SRAM ADDRESS BIT 7 MSB 00h 0 10 Seconds Seconds Seconds 00–59 01h 0 10 Minutes Minutes Minutes 00–59 02h 0 12/24 Hour Hours 1–12 + AM/PM 00–23 03h 0 0 Day 1–7 04h 0 0 05h Century BIT 6 BIT 5 AM/PM 20 Hour BIT 3 BIT 2 10 Hour 0 0 0 BIT 1 0 10 Month BIT 0 LSB Day 10 Date 0 06h BIT 4 FUNCTION RANGE Date Date 1–31 Month Month/ Century 01–12 + Century Year Year 00–99 07h A1M1 10 Year 10 Seconds Seconds Alarm 1 Seconds 00–59 08h A1M2 10 Minutes Minutes Alarm 1 Minutes 00–59 09h A1M3 12/24 Hour Alarm 1 Hours 1–12 + AM/PM 00–23 0Ah A1M4 DY/DT Day Alarm 1 Day 1–7 0Bh A2M2 0Ch A2M3 12/24 0Dh A2M4 DY/DT 0Eh EOSC BBSQW CONV RS2 RS1 INTCN A2IE A1IE 0Fh OSF BB32kHz CRATE1 CRATE0 EN32kHz BSY A2F A1F 10h SIGN DATA DATA DATA DATA DATA DATA 11h SIGN DATA DATA DATA DATA DATA DATA 12h DATA DATA 0 0 0 0 13h 0 0 0 0 0 14h–0FFh x x x x x AM/PM 20 Hour 10 Hour 10 Date 10 Minutes AM/PM 20 Hour Date Alarm 1 Date 1–31 Minutes Alarm 2 Minutes 00–59 Hour Alarm 2 Hours 1–12 + AM/PM 00–23 Day Alarm 2 Day 1–7 Alarm 2 Date 1–31 Control — Control/Status — DATA Aging Offset — DATA MSB of Temp — 0 0 LSB of Temp — 0 0 0 Not used Reserved for test x x x SRAM 00h–0FFh 10 Hour 10 Date Date Note: Unless otherwise specified, the registers’ state is not defined when power is first applied. event, it is possible that the microcontroller and DS3232 I2C communications could become unsynchronized, e.g., the microcontroller resets while reading data from the DS3232. When the microcontroller resets, the DS3232 I2C interface may be placed into a known state by toggling SCL until SDA is observed to be at a high level. At that point the microcontroller should pull SDA low while SCL is high, generating a START condition. If SCL is held low for greater than tIF, the internal I2C interface is reset. This limits the minimum frequency at which the I 2C interface can be operated. If data is Maxim Integrated being written to the device when the interface timeout is exceeded, prior to the acknowledge, the incomplete byte of data is not written. Clock and Calendar The time and calendar information is obtained by reading the appropriate register bytes. Figure 1 illustrates the RTC registers. The time and calendar data are set or initialized by writing the appropriate register bytes. The contents of the time and calendar registers are in binary-coded decimal (BCD) format. The DS3232 can be run in either 12-hour or 24-hour mode. Bit 6 of the 11 DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Alarms hours register is defined as the 12- or 24-hour mode select bit. When high, 12-hour mode is selected. In 12hour mode, bit 5 is the AM/PM bit with logic-high being PM. In 24-hour mode, bit 5 is the 20-hour bit (20–23 hours). The century bit (bit 7 of the month register) is toggled when the years register overflows from 99 to 00. The day-of-week register increments at midnight. Values that correspond to the day of week are userdefined but must be sequential (i.e., if 1 equals Sunday, then 2 equals Monday, and so on). Illogical time and date entries result in undefined operation. When reading or writing the time and date registers, secondary (user) buffers are used to prevent errors when the internal registers update. When reading the time and date registers, the user buffers are synchronized to the internal registers on any START and when the register pointer rolls over to zero. The time information is read from these secondary registers, while the clock continues to run. This eliminates the need to reread the registers in case the main registers update during a read. The countdown chain is reset whenever the seconds register is written. Write transfers occur on the acknowledge from the DS3232. Once the countdown chain is reset, to avoid rollover issues the remaining time and date registers must be written within 1 second. The 1Hz square-wave output, if enabled, transitions high 500ms after the seconds data transfer, provided the oscillator is already running. The DS3232 contains two time-of-day/date alarms. Alarm 1 can be set by writing to registers 07h to 0Ah. Alarm 2 can be set by writing to registers 0Bh to 0Dh. The alarms can be programmed (by the alarm enable and INTCN bits of the control register) to activate the INT/SQW output on an alarm match condition. Bit 7 of each of the time-ofday/date alarm registers are mask bits (Table 2). When all the mask bits for each alarm are logic 0, an alarm only occurs when the values in the timekeeping registers match the corresponding values stored in the time-ofday/date alarm registers. The alarms can also be programmed to repeat every second, minute, hour, day, or date. Table 2 shows the possible settings. Configurations not listed in the table result in illogical operation. The DY/DT bits (bit 6 of the alarm day/date registers) control whether the alarm value stored in bits 0 to 5 of that register reflects the day of the week or the date of the month. If DY/DT is written to logic 0, the alarm will be the result of a match with date of the month. If DY/DT is written to logic 1, the alarm will be the result of a match with day of the week. When the RTC register values match alarm register settings, the corresponding Alarm Flag ‘A1F’ or ‘A2F’ bit is set to logic 1. If the corresponding Alarm Interrupt Enable ‘A1IE’ or ‘A2IE’ is also set to logic 1 and the INTCN bit is set to logic 1, the alarm condition activates the INT/SQW signal. The match is tested on the onceper-second update of the time and date registers. Table 2. Alarm Mask Bits DY/DT ALARM RATE A1M3 A1M2 A1M1 X 1 1 1 1 Alarm once per second X 1 1 1 0 Alarm when seconds match X 1 1 0 0 Alarm when minutes and seconds match X 1 0 0 0 Alarm when hours, minutes, and seconds match 0 0 0 0 0 Alarm when date, hours, minutes, and seconds match 1 0 0 0 0 Alarm when day, hours, minutes, and seconds match DY/DT 12 ALARM 1 REGISTER MASK BITS (BIT 7) A1M4 ALARM 2 REGISTER MASK BITS (BIT 7) ALARM RATE A2M4 A2M3 A2M2 X 1 1 1 Alarm once per minute (00 seconds of every minute) X 1 1 0 Alarm when minutes match X 1 0 0 Alarm when hours and minutes match 0 0 0 0 Alarm when date, hours, and minutes match 1 0 0 0 Alarm when day, hours, and minutes match Maxim Integrated DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Control Register (0Eh) BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 NAME: EOSC BBSQW CONV RS2 RS1 INTCN A2IE A1IE POR*: 0 0 0 1 1 1 0 0 *POR is defined as the first application of power to the device, either VBAT or VCC. Special-Purpose Registers The DS3232 has two additional registers (control and control/status) that control the real-time clock, alarms, and square-wave output. Control Register (0Eh) Bit 7: Enable Oscillator (EOSC). When set to logic 0, the oscillator is started. When set to logic 1, the oscillator is stopped when the DS3232 switches to battery power. This bit is clear (logic 0) when power is first applied. When the DS3232 is powered by VCC, the oscillator is always on regardless of the status of the EOSC bit. When EOSC is disabled, all register data is static. Bit 6: Battery-Backed Square-Wave Enable (BBSQW). When set to logic 1 with INTCN = 0 and VCC < VPF, this bit enables the square wave. When BBSQW is logic 0, the INT/SQW pin goes high impedance when VCC < VPF. This bit is disabled (logic 0) when power is first applied. Bit 5: Convert Temperature (CONV). Setting this bit to 1 forces the temperature sensor to convert the temperature into digital code and execute the TCXO algorithm to update the capacitance array to the oscillator. This can only happen when a conversion is not already in progress. The user should check the status bit BSY before forcing the controller to start a new TCXO execution. A user-initiated temperature conversion does not affect the internal 64-second (default interval) update cycle. A user-initiated temperature conversion does not affect the BSY bit for approximately 2ms. The CONV bit remains at a 1 from the time it is written until the conversion is finished, at which time both CONV and BSY go to 0. The CONV bit should be used when monitoring the status of a user-initiated conversion. Bits 4 and 3: Rate Select (RS2 and RS1). These bits control the frequency of the square-wave output when Maxim Integrated the square wave has been enabled. The following table shows the square-wave frequencies that can be selected with the RS bits. These bits are both set to logic 1 (8.192kHz) when power is first applied. SQUARE-WAVE OUTPUT FREQUENCY RS2 RS1 SQUARE-WAVE OUTPUT FREQUENCY 0 0 1Hz 0 1 1.024kHz 1 0 4.096kHz 1 1 8.192kHz Bit 2: Interrupt Control (INTCN). This bit controls the INT/SQW signal. When the INTCN bit is set to logic 0, a square wave is output on the INT/SQW pin. When the INTCN bit is set to logic 1, a match between the timekeeping registers and either of the alarm registers activates the INT/SQW (if the alarm is also enabled). The corresponding alarm flag is always set regardless of the state of the INTCN bit. The INTCN bit is set to logic 1 when power is first applied. Bit 1: Alarm 2 Interrupt Enable (A2IE). When set to logic 1, this bit permits the alarm 2 flag (A2F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A2IE bit is set to logic 0 or INTCN is set to logic 0, the A2F bit does not initiate an interrupt signal. The A2IE bit is disabled (logic 0) when power is first applied. Bit 0: Alarm 1 Interrupt Enable (A1IE). When set to logic 1, this bit permits the alarm 1 flag (A1F) bit in the status register to assert INT/SQW (when INTCN = 1). When the A1IE bit is set to logic 0 or INTCN is set to logic 0, the A1F bit does not initiate the INT/SQW signal. The A1IE bit is disabled (logic 0) when power is first applied. 13 DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Control/Status Register (0Fh) BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 NAME: OSF BB32kHz CRATE1 CRATE0 EN32kHz BSY A2F A1F POR*: 1 1 0 0 1 0 0 0 *POR is defined as the first application of power to the device, either VBAT or VCC. Control/Status Register (0Fh) Bit 7: Oscillator Stop Flag (OSF). A logic 1 in this bit indicates that the oscillator either is stopped or was stopped for some period and may be used to judge the validity of the timekeeping data. This bit is set to logic 1 any time that the oscillator stops. The following are examples of conditions that can cause the OSF bit to be set: 1) The first time power is applied. 2) The voltages present on both VCC and VBAT are insufficient to support oscillation. 3) The EOSC bit is turned off in battery-backed mode. 4) External influences on the crystal (i.e., noise, leakage, etc.). This bit remains at logic 1 until written to logic 0. Bit 6: Battery-Backed 32kHz Output (BB32kHz). This bit enables the 32kHz output when powered from VBAT (provided EN32kHz is enabled). If BB32kHz = 0, the 32kHz output is low when the part is powered by VBAT. Bits 5 and 4: Conversion Rate (CRATE1 and CRATE0). These two bits control the sample rate of the TCXO. The sample rate determines how often the temperature sensor makes a conversion and applies compensation to the oscillator. Decreasing the sample rate decreases the overall power consumption by decreasing the frequency at which the temperature sensor operates. However, significant temperature changes that occur between samples may not be completely compensated for, which reduce overall accuracy. When a new conversion rate is written to the register, it may take up to the new conversion rate time before the conversions occur at the new rate. CRATE1 14 CRATE0 Bit 3: Enable 32kHz Output (EN32kHz). This bit indicates the status of the 32kHz pin. When set to logic 1, the 32kHz pin is enabled and outputs a 32.768kHz square-wave signal. When set to logic 0, the 32kHz pin goes low. The initial power-up state of this bit is logic 1, and a 32.768kHz square-wave signal appears at the 32kHz pin after a power source is applied to the DS3232 (if the oscillator is running). Bit 2: Busy (BSY). This bit indicates the device is busy executing TCXO functions. It goes to logic 1 when the conversion signal to the temperature sensor is asserted and then is cleared when the conversion is complete. Bit 1: Alarm 2 Flag (A2F). A logic 1 in the alarm 2 flag bit indicates that the time matched the alarm 2 registers. If the A2IE bit is logic 1 and the INTCN bit is set to logic 1, the INT/SQW pin is also asserted. A2F is cleared when written to logic 0. This bit can only be written to logic 0. Attempting to write to logic 1 leaves the value unchanged. Bit 0: Alarm 1 Flag (A1F). A logic 1 in the alarm 1 flag bit indicates that the time matched the alarm 1 registers. If the A1IE bit is logic 1 and the INTCN bit is set to logic 1, the INT/SQW pin is also asserted. A1F is cleared when written to logic 0. This bit can only be written to logic 0. Attempting to write to logic 1 leaves the value unchanged. SAMPLE RATE (seconds) 0 0 64 0 1 128 1 0 256 1 1 512 Maxim Integrated DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM Aging Offset (10h) BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 NAME: SIGN DATA DATA DATA DATA DATA DATA DATA POR*: 0 0 0 0 0 0 0 0 Temperature Register (Upper Byte) (11h) BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 NAME: SIGN DATA DATA DATA DATA DATA DATA DATA POR*: 0 0 0 0 0 0 0 0 Temperature Register (Lower Byte) (12h) BIT 7 BIT 6 BIT 5 NAME: BIT 4 BIT 3 DATA DATA POR*: 0 0 BIT 2 BIT 1 BIT 0 0 0 0 0 0 0 0 0 0 0 0 0 SRAM (14h–FFh) BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT 0 NAME: D7 D6 D5 D4 D3 D2 D1 D0 POR*: X X X X X X X X *POR is defined as the first application of power to the device, either VBAT or VCC. Aging Offset Register The aging offset register takes a user-provided value to add to or subtract from the oscillator capacitor array. The data is encoded in two’s complement, with bit 7 representing the sign bit. One LSB represents the smallest capacitor to be switched in or out of the capacitance array at the crystal pins. The aging offset register capacitance value is added or subtracted from the capacitance value that the device calculates for each temperature compensation. The offset register is added to the capacitance array during a normal temperature conversion, if the temperature changes from the previous conversion, or during a manual user conversion (setting the CONV bit). To see the effects of the aging register on the 32kHz output frequency immediately, a manual conversion should be started after each aging offset register change. Positive aging values add capacitance to the array, slowing the oscillator frequency. Negative values remove capacitance from the array, increasing the oscillator frequency. The change in ppm per LSB is different at different temperatures. The frequency vs. temperature curve is shifted by the values used in this register. At +25°C, Maxim Integrated one LSB typically provides about 0.1ppm change in frequency. Use of the aging register is not needed to achieve the accuracy as defined in the EC tables, but could be used to help compensate for aging at a given temperature. See the Typical Operating Characteristics section for a graph showing the effect of the register on accuracy over temperature. Temperature Registers (11h–12h) Temperature is represented as a 10-bit code with a resolution of 0.25°C and is accessible at location 11h and 12h. The temperature is encoded in two’s complement format, with bit 7 in the MSB representing the sign bit. The upper 8 bits, the integer portion, are at location 11h and the lower 2 bits, the fractional portion, are in the upper nibble at location 12h. For example, 00011001 01b = +25.25°C. Upon power reset, the registers are set to a default temperature of 0°C and the controller starts a temperature conversion. The temperature is read on initial application of VCC or I2C access on VBAT and once every 64 seconds afterwards. The temperature registers are updated after each user-initiated conversion and on every 64-second conversion. The temperature registers are read-only. 15 DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM MSB FIRST MSB LSB MSB LSB SDA SLAVE ADDRESS SCL 1–7 IDLE START CONDITION R/W 8 ACK 9 DATA 1–7 ACK 8 9 REPEATED IF MORE BYTES ARE TRANSFERRED DATA 1–7 ACK/ NACK 8 9 STOP CONDITION REPEATED START Figure 2. I2C Data Transfer Overview I2C Serial Data Bus The DS3232 supports a bidirectional I2C bus and data transmission protocol. A device that sends data onto the bus is defined as a transmitter and a device receiving data is defined as a receiver. The device that controls the message is called a master. The devices that are controlled by the master are slaves. The bus must be controlled by a master device that generates the serial clock (SCL), controls the bus access, and generates the START and STOP conditions. The DS3232 operates as a slave on the I2C bus. Connections to the bus are made through the SCL input and open-drain SDA I/O lines. Within the bus specifications, a standard mode (100kHz maximum clock rate) and a fast mode (400kHz maximum clock rate) are defined. The DS3232 works in both modes. The following bus protocol has been defined (Figure 2): • Data transfer may be initiated only when the bus is not busy. • During data transfer, the data line must remain stable whenever the clock line is high. Changes in the data line while the clock line is high are interpreted as control signals. Accordingly, the following bus conditions have been defined: Bus not busy: Both data and clock lines remain high. Start data transfer: A change in the state of the data line from high to low, while the clock line is high, defines a START condition. Stop data transfer: A change in the state of the data line from low to high, while the clock line is high, defines a STOP condition. 16 Data valid: The state of the data line represents valid data when, after a START condition, the data line is stable for the duration of the high period of the clock signal. The data on the line must be changed during the low period of the clock signal. There is one clock pulse per bit of data. Each data transfer is initiated with a START condition and terminated with a STOP condition. The number of data bytes transferred between the START and the STOP conditions is not limited, and is determined by the master device. The information is transferred byte-wise and each receiver acknowledges with a ninth bit. Acknowledge: Each receiving device, when addressed, is obliged to generate an acknowledge after the reception of each byte. The master device must generate an extra clock pulse, which is associated with this acknowledge bit. A device that acknowledges must pull down the SDA line during the acknowledge clock pulse in such a way that the SDA line is stable low during the high period of the acknowledge-related clock pulse. Of course, setup and hold times must be taken into account. A master must signal an end of data to the slave by not generating an acknowledge bit on the last byte that has been clocked out of the slave. In this case, the slave must leave the data line high to enable the master to generate the STOP condition. Figures 3 and 4 detail how data transfer is accomplished on the I2C bus. Depending upon the state of the R/W bit, two types of data transfer are possible: Data transfer from a master transmitter to a slave receiver. The first byte transmitted by the master is Maxim Integrated DS3232 Extremely Accurate I2C RTC with Integrated Crystal and SRAM S 1101000 0 A XXXXXXXX A XXXXXXXX S - START SLAVE TO MASTER A - ACKNOWLEDGE (ACK) P - STOP R/W - READ/WRITE OR DIRECTION BIT ADDRESS A XXXXXXXX
DS3232SN#T 价格&库存

很抱歉,暂时无法提供与“DS3232SN#T”相匹配的价格&库存,您可以联系我们找货

免费人工找货
DS3232SN#T
  •  国内价格
  • 1+38.13750
  • 10+36.72500
  • 100+33.33500
  • 500+31.64000

库存:0