Bringup
Open the editor
Behavioural mixed-signal modelDS3231SN#ds3231

DS3231 (real-time clock, I²C)

Precise I²C real-time clock (±2 ppm, crystal inside) at address 0x68: seconds … year in BCD, two alarms on INT/SQW, square wave, temperature register. The clock starts at the set date and time and runs with the simulation time. Read e.g. with RTClib.

VCCVBATRST̅GNDSCLSDAINT/SQW32kHzDS3231SN#
Schematic symbol

Key data

Category
ICs
Simulation model
Behavioural mixed-signal model
Manufacturer part number
DS3231SN#
Reference prefix
U
Pins
8
Land pattern
SOIC-16W_7.5x10.3mm_P1.27mm

Notes

  • Set the start date and time in the inspector; the firmware reads it in BCD from registers 00h–06h.
  • INT/SQW and 32kHz are open-drain outputs: they need a pull-up resistor.

Simulation model

A behavioural model implements the interface of the chip (registers, protocol, timing) at its pins. The pins are connected to the analog circuit like CMOS pins.

Model
ds3231
Supply pins
VCC / GND

Pins 8

PinNameUse
VCCVCCSupply pinSupply 2.3–5.5 V: 100 nF to GND
VBATVBATSupply pinBackup cell (CR2032) or GND when no battery is used
RSTRST̅Output pin · pulled up on the boardReset output, active low (internal 50 kΩ pull-up): low at power-up and during brown-out
GNDGNDGround pinGround
SCLSCLInput pinI²C clock: pull-up (about 4.7 kΩ) to the supply
SDASDAI/O pinI²C data: pull-up (about 4.7 kΩ) to the supply
INTINT/SQWOutput pinAlarm interrupt or square wave (open drain): pull-up resistor to the supply
32K32kHzOutput pin32.768 kHz output (open drain): pull-up resistor, or leave open

Parameters 3

Date and time at startstart
Default2026-01-01 12:00:00

YYYY-MM-DD hh:mm:ss; the clock then runs with the simulation time

Temperaturetemplive
Default25 °C
Simulate the 32 kHz outputsim32k
Defaultoff

65 536 edges per simulated second: slows the simulation down

PCB

Verified land patternSOIC-16W_7.5x10.3mm_P1.27mm
PackageLand patternStatusSource
SOIC-16W · DS3231SN#SOIC-16W_7.5x10.3mm_P1.27mmVerified land patternKiCad Package_SO:SOIC-16W_7.5x10.3mm_P1.27mm; DS3231 datasheet pinout 1 32kHz, 2 VCC, 3 INT/SQW, 4 RST, 5–12 N.C. (grounded), 13 GND, 14 VBAT, 15 SDA, 16 SCL
  • VBAT Backup cell (CR2032) or GND when no battery is used