The DS3231 is a temperature-compensated crystal oscillator (TCXO) RTC. An internal temperature sensor adjusts the crystal frequency to maintain ±2 ppm accuracy (< 1 minute per year). A CR2032 coin cell provides backup power when main power is removed.
| IC | DS3231 |
| Interface | I²C (400 kHz) |
| Accuracy | ±2 ppm (0 – 40 °C) |
| Supply voltage | 2.3 – 5.5 V |
| Battery backup | CR2032 (years of backup) |
| Registers | Seconds, Minutes, Hours, Day, Date, Month, Year |
| Alarm outputs | 2 programmable alarms |
| Temperature sensor | ±3 °C built-in |
A 32.768 kHz crystal oscillator provides the time base. The integrated temperature sensor measures die temperature and applies a correction factor to the crystal's load capacitance array, compensating for frequency drift across the operating temperature range.
Backup battery lasts years but is not rechargeable — must be replaced. Initial time must be set by host. Does not handle leap-seconds or DST automatically. Temp compensation only within rated range (−40 to +85 °C). I²C address fixed at 0x68.