Ds3231, Extremely accurate i, C-integrated rtc/tcxo/crystal – Rainbow Electronics DS3231 User Manual

Page 10: Operation, Address map, C interface, Table 1. power control

Advertising
background image

DS3231

Operation

The block diagram shows the main elements of the
DS3231. The eight blocks can be grouped into four
functional groups: TCXO, power control, pushbutton
function, and RTC. Their operations are described sep-
arately in the following sections.

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 capaci-
tance selection registers. New values, including
changes to the AGE register, are loaded only when a
change in the temperature value occurs, or when a
user-initiated temperature conversion is completed.
The temperature is read on initial application of V

CC

and once every 64 seconds afterwards.

Power Control

This function is provided by a temperature-compensat-
ed voltage reference and a comparator circuit that
monitors the V

CC

level. When V

CC

is greater than V

PF

,

the part is powered by V

CC

. When V

CC

is less than V

PF

but greater than V

BAT

, the DS3231 is powered 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.

To preserve the battery, the first time V

BAT

is applied to

the device, the oscillator will not start up until V

CC

is

applied, or until a valid I

2

C address is written to the

part. Typical oscillator startup time is less than one sec-
ond. Approximately 2 seconds after V

CC

is applied, or

a valid I

2

C address is written, the device makes a tem-

perature measurement and applies the calculated cor-
rection 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 temperature and correct the oscillator fre-
quency every 64 seconds.

Pushbutton Reset Function

The DS3231 provides for a pushbutton switch to be con-
nected to the RST output pin. When the DS3231 is not in
a reset cycle, it continuously monitors the RST signal for a
low going edge. If an edge transition is detected, the
DS3231 debounces the switch by pulling the RST low.
After the internal timer has expired (PB

DB

), the DS3231

continues to monitor the RST line. If the line is still low, the
DS3231 continuously monitors the line looking for a rising
edge. Upon detecting release, the DS3231 forces the
RST pin low and holds it low for t

RST

.

The same pin, RST, is used to indicate a power-fail con-
dition. When V

CC

is lower than V

PF

, an internal power-fail

signal is generated, which forces the RST pin low. When
V

CC

returns to a level above V

PF

, the RST pin is held low

for approximately 250ms (t

REC

) to allow the power sup-

ply to stabilize. If the oscillator is not running (see the
Power Control section) when V

CC

is applied, t

REC

is

bypassed and RST immediately goes high.

Real-Time Clock

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 automati-
cally adjusted for months with fewer than 31 days, includ-
ing 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.

Address Map

Figure 1 shows the address map for the DS3231 time-
keeping registers. During a multibyte access, when the
address pointer reaches the end of the register space
(12h), it wraps around to location 00h. On an I

2

C

START or address pointer incrementing to location 00h,
the current time is transferred to a second set of regis-
ters. 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.

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 DS3231 resets because of a loss of V

CC

or other

event, it is possible that the microcontroller and DS3231
I

2

C communications could become unsynchronized,

e.g., the microcontroller resets while reading data from
the DS3231. When the microcontroller resets, the

Extremely Accurate I

2

C-Integrated

RTC/TCXO/Crystal

10

____________________________________________________________________

SUPPLY CONDITION

POWERED BY

V

CC

< V

PF

, V

CC

< V

BAT

V

BAT

V

CC

< V

PF

, V

CC

> V

BAT

V

CC

V

CC

> V

PF

, V

CC

< V

BAT

V

CC

V

CC

> V

PF

, V

CC

> V

BAT

V

CC

Table 1. Power Control

Advertising