Data retention mode, Auxiliary battery, Power-on reset – Rainbow Electronics DS1500 User Manual

Page 12: Time and date operation, Reading the clock

Advertising
background image

DS1500 Y2KC Watchdog RTC with Nonvolatile Control

12 of 19

DATA RETENTION MODE

The DS1500 is fully accessible and data can be written and read only when V

CCI

is greater than V

PF

. However,

when V

CCI

falls below the power-fail point V

PF

(point at which write protection occurs) the internal clock registers

and SRAM are blocked from any access. While in the data retention mode, all inputs are don’t cares and outputs
go to a high-Z state, with the exception of V

CCO

, CEO, and with the possible exception of KS, PWR, SQW, and RST.

CEO is forced high. If V

PF

is less than V

BAT

and V

BAUX

, the device power is switched from V

CCI

to the greater of V

BAT

and V

BAUX

when V

CCI

drops below V

PF

. If V

PF

is greater than V

BAT

and V

BAUX

, the device power and V

CCO

are

switched from V

CCI

to the larger of V

BAT

and V

BAUX

when V

CCI

drops below the larger of V

BAT

and V

BAUX

. RTC

operation and SRAM data are maintained from the battery until V

CC

is returned to nominal levels (Table 1). If the

square-wave and battery-backup 32kHz functions are enabled, V

BAUX

always provides power for the square-wave

output, when the device is in battery-backup mode. All control, data, and address signals must be no more than
0.3V above V

CCI

.

AUXILIARY BATTERY

The V

BAUX

input is provided to supply power from an auxiliary battery for the DS1500 kickstart and square-wave

output features in the absence of V

CCI

. This power source must be available to use these auxiliary features when

no V

CCI

is applied to the device.


This auxiliary battery can be used as the primary backup power source for maintaining the clock/calendar and
external SRAM. This occurs if the V

BAT

pin is at a lower voltage than V

BAUX

. If the DS1500 is to be backed-up using

a single battery with the auxiliary features enabled, then V

BAUX

should be used and connected to V

BAT

. If V

BAUX

is

not to be used, it should be grounded.

POWER-ON RESET

A temperature-compensated comparator circuit monitors the level of V

CCI

. When V

CCI

falls to the power-fail trip

point, the RST signal (open drain) is pulled low. When V

CCI

returns to nominal levels, the RST signal continues to be

pulled low for a period of t

REC

. The power-on reset function is independent of the RTC oscillator and therefore

operational whether or not the oscillator is enabled.

TIME AND DATE OPERATION

The time and date information is obtained by reading the appropriate register bytes. Table 2 shows the RTC
registers. The time and date are set or initialized by writing the appropriate register bytes. The contents of the time
and date registers are in the binary-coded decimal (BCD) format. Hours are in 24-hour mode. The day-of-week
register increments at midnight. Values that correspond to the day of week are user-defined, but must be
sequential (i.e., if 1 equals Sunday, then 2 equals Monday, and so on). Illogical time and date entries result in
undefined operation.

READING THE CLOCK

When reading the clock and calendar data, it is possible to access the registers while an update (once per second)
occurs. There are three ways to avoid using invalid time and date data.

The first method uses the transfer enable (TE) bit in the control B register. Transfers are halted when a 0 is written
to the TE bit. Setting TE to 0 halts updates to the user-accessible registers, while allowing the internal registers to
advance. After the registers are read, the TE bit should be written to 1. TE must be kept at 1 for at least 366µs to
ensure a user register update.

The time and date registers can be read and stored in temporary variables. The time and date registers are then
read again, and compared to the first values. If the values do not match, the time and date registers should be read
a third time and compared to the previous values. This should be done until two consecutive reads of the time and
date registers match. The TE bit should always be enabled when using this method for reading the time and date,.

The third method of reading the time and date uses the alarm function. The alarm can be configured to activate
once per second, and the time-of-day alarm-interrupt enable bit (TIE) is enabled. The TE bit should always be
enabled. When the IRQ pin goes active, the time and date information does not change until the next update.

Advertising