DS3231 Real Time Clock RTC Integrated Crystal, 2 Alarms, Extremely Accurate High Precision
DS3231 is a low-cost, high accuracy I²C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. Example DS3231 code & driver are below. Very precise time keeping.
Hello World
Import programDS3231demo
Hello World demo for DS3231 library
Library
Import libraryds3231
Library for DS3231 RTC
Pinout
Datasheet
http://datasheets.maximintegrated.com/en/ds/DS3231.pdfNotes
The DS3231 is a low-cost, highly accurate I²C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) crystal. The device incorporates a battery input, and maintains high precision 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 manufacturing part count. The DS3231 is available in commercial (0°C to +70°C) and industrial (-40°C to +85°C) temperature ranges, and is offered in a 16-pin, 300-mil SO package.
The DS3232 variant includes SRAM for the battery back-up of the settings. The DS32B35 has 2K of NVRAM and the DS32C35 has 8K of NVRAM. The DS3231M and the DS3232M use a MEMS resonator which allows the package size to be reduced to half and it resistant to aging, shock and high vibrations.
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 active-low AM/PM indicator. Two programmable time-of-day alarms and a programmable square-wave output are provided. Address and data are transferred serially through an I²C 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 active-low RST pin is monitored as a pushbutton input for generating a µP reset.
Key Features
- Two Time-of-Day Alarms
- Leap-Year Compensation Valid Until 2100
- Programmable Square-Wave Output Signal
- Digital Temperature Sensor Output: ±3°C Accuracy
- Register for Age Trimming
- Active-Low RST Output/Pushbutton Reset Debounce Input
- Battery-Backup Input for Continuous Timekeeping
- Low Power Operation Extends Battery-Backup Run Time
- 3.3V Operation
- Underwriters Laboratories® (UL) Recognized
Accuracy | Temperature Range |
±2ppm (63 sec/year) | 0°C to +40°C |
±3.5ppm (110 sec/year) | -40°C to +85°C |
Linux driver source code for the RTC DS1307, DS1308, DS1337 to DS1341, DS1388, DS3231
Typical applications are for power meters, access control door locks, timecards, DVD/digital recorders, digital camers, GPS, POS devices, medical devices and video games.
Typical Operating Circuit
Application Notes
- Feature Comparison of the DS323x Real-Time Clocks
- Design Considerations for Maxim Real-Time Clocks
- Tips for Writing Bulletproof Real-Time Clock Control Code
- State Machine Logic in Binary-Coded Decimal (BCD)-Formatted Real-Time Clocks
- Implementing Flawless Designs with Accurate I²C Real-Time Clocks
- Selecting a Backup Source for Real-Time Clocks
- Power Considerations for Accurate Real-Time Clocks
- Industry Turns to MEMS for Accurate Real-Time Clocks
- Interfacing a DS3231 with an 8051-Type Microcontroller
- Crystal Considerations with Maxim Real-Time Clocks (RTCs)
Product Pages
- DS3231MPMB1 Peripheral Module EvalKit
- DS3231MZEVKIT EvKit for the DS3231M or DS3232M
- DS3231M Real-Time Clock, Internal MEMS Resonator
- DS3231 Real-Time Clock, Integrated Crystal
- DS3232M RTC, SRAM, Internal MEMS Resonator
- DS3232 RTC, Integrated Crystal, SRAM
- DS32B35 RTC, Integrated Crystal, NVRAM
- DS3234 RTC, Integrated Crystal, SRAM, SPI bus
Where to Buy
- DS3231MPMB1 Evaluation Kit for DS3231M RTC
- DS3231MZEVKIT EvKit for the DS3231M or DS3232M
- DS3231M RTC, Internal MEMS Resonator
- DS3231 RTC, Integrated Crystal
- DS3232M RTC, SRAM, Internal MEMS Resonator
- DS3232 RTC, Integrated Crystal, SRAM
- DS32B35 RTC, Integrated Crystal, NVRAM
- DS3234 RTC, Integrated Crystal, SRAM, SPI bus
- Adafruit DS3231 Precision RTC Breakout Board
- Adafruit DS3231 Precision RTC FeatherWing Board
You need to log in to post a discussion
Questions
7 years, 9 months ago