Datasheet

±5ppm, I
2
C Real-Time Clock
10 Maxim Integrated
DS3231M
by V
CC
. If V
CC
is less than V
PF
and is less than V
BAT
, the
device is powered by V
BAT
(see Table 1).
When V
CC
< V
PF
, the RST output is asserted (active
low). When V
CC
is the presently selected power source,
temperature conversions are executed once per second.
When V
BAT
is the presently selected power source, tem-
perature conversions are executed once every 10s.
To preserve the battery, the first time V
BAT
is applied
to the device the oscillator does not start up until V
CC
exceeds V
PF
or until a valid I
2
C address is written to
the device. Typical oscillator startup time is less than
1s. Approximately 2s after V
CC
is applied, or a valid
I
2
C address is written, the device makes a temperature
measurement and applies the calculated correction to
the oscillator. Once the oscillator is running, it continues
to run as long as a valid power source is available (V
CC
or V
BAT
), and the device continues to measure the tem-
perature and correct the oscillator frequency. On the first
application of V
CC
power, or (if V
BAT
powered) when a
valid I
2
C address is written to the device, the time and
date registers are reset to 01/01/00 01 00:00:00 (DD/MM/
YY DOW HH:MM:SS).
Initial V
BAT
Attachment
During the initial battery attachment to the DS3231M, it
is important to eliminate the effects of contact bounce.
Contact bounce occurs when battery contact rapidly
and repeatedly alternates between connected and dis-
connected during the battery attachment before finally
settling to the connected state. This bounce can cause a
momentary power interruption to the DS3231M that can
result in memory recall corruption in the device.
There are two recommended ways to eliminate the
effects of contact bounce on the device. The preferred
way uses power sequencing by applying V
CC
to the part
before performing the battery attachment. An alternate
method to eliminate contact bounce is to filter the signal
using a small capacitor between V
BAT
and ground. For
this method, capacitor values between 0.1nf and 1nf are
recommended for the supply filtering.
V
BAT
Operation
There are several modes of operation that affect the
amount of V
BAT
current that is drawn. While the device
is powered by V
BAT
and the serial interface is active,
the active battery current I
BATA
is drawn. When the
serial interface is inactive, the timekeeping current I
BATT
(which includes the averaged temperature-conversion
current I
BATTC
) is used. The temperature-conversion
current I
BATTC
is specified since the system must be
able to support the periodic higher current pulse and
still maintain a valid voltage level. The data-retention
current I
BATDR
is the current drawn by the device when
the oscillator is stopped (EOSC = 1). This mode can be
used to minimize battery requirements for periods 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 device provides for a pushbutton switch to be con-
nected to the RST input/output pin. When the device is
not in a reset cycle, it continuously monitors RST for a
low-going edge. If an edge transition is detected, the
device debounces the switch by pulling RST low. After
the internal timer has expired (PB
DB
), the device con-
tinues to monitor the RST line. If the line is still low, the
device continuously monitors the line looking for a rising
edge. Upon detecting release, the device forces RST
low and holds it low for t
RST
. RST is also used to indicate
a power-fail condition. When V
CC
is lower than V
PF
, an
internal power-fail signal is generated, which forces RST
low. When V
CC
returns to a level above V
PF
, RST is held
low for approximately 250ms (t
REC
) to allow the power
supply to stabilize. If the oscillator is not running when
V
CC
is applied, t
REC
is bypassed and RST immedi-
ately goes high. Assertion of the RST output, whether by
pushbutton or power-fail detection, does not affect the
device’s internal operation. RST output operation and
pushbutton monitoring are only available if V
CC
power
is available.
Real-Time Clock (RTC)
With the 1Hz source from the temperature-compensated
oscillator, 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 the
12-hour format with an AM/PM indicator. The clock pro-
vides two programmable time-of-day alarms. INT/SQW
can be enabled to generate either an interrupt due to an
alarm condition or a 1Hz square wave. This selection is
controlled by the INTCN bit in the Control register.
I
2
C Interface
The I
2
C interface is accessible whenever either V
CC
or
V
BAT
is at a valid level. If a microcontroller connected
to the device resets because of a loss of V
CC
or other
event, it is possible that the microcontroller and device’s
I
2
C communications could become unsynchronized,