RTCs with Constant-Voltage Trickle Charger
methods of avoiding any possible incorrect time and
calendar reads are covered later in this text.
two most significant bits of each byte set the don’t-care
condition when at logic 1. An alarm is generated each
hour when the don’t-care bits are set in the hours byte.
Similarly, an alarm is generated every minute with
don’t-care codes in the hours and minute alarm bytes.
The don’t-care codes in all three alarm bytes create an
interrupt every second.
The three alarm bytes can be used in two ways. First,
when the alarm time is written in the appropriate hours,
minutes, and seconds alarm locations, the alarm inter-
rupt is initiated at the specified time each day, if the
alarm-enable bit is high. In this mode, the “0” bits in the
alarm registers and the corresponding time registers
must always be written to 0 (Table 2A and 2B). Writing
the 0 bits in the alarm and/or time registers to 1 can
result in undefined operation.
All 128 bytes can be directly written or read, except for
the following:
1) Registers C and D are read-only.
2) Bit 7 of register A is read-only.
The second use condition is to insert a “don’t care”
state in one or more of the three alarm bytes. The don’t-
care code is any hexadecimal value from C0 to FF. The
3) The MSB of the seconds byte is read-only.
Table 2A. Time, Calendar, and Alarm Data Modes—BCD Mode (DM = 0)
ADDRESS
BIT 7
BIT 6 BIT 5
BIT 4
BIT 3
BIT 2
BIT 1
BIT 0
FUNCTION
RANGE
00H
0
10 Seconds
Seconds
Seconds
00–59
01H
02H
03H
0
10 Seconds
10 Minutes
10 Minutes
Seconds
Minutes
Minutes
Seconds Alarm
Minutes
00–59
00–59
00–59
0
0
Minutes Alarm
AM/PM
0
0
0
10 Hours
10 Hours
10 Hours
10 Hours
1–12 +AM/PM
00–23
04H
05H
0
0
Hours
Hours
Hours
0
AM/PM
1–12 +AM/PM
00–23
Hours Alarm
0
0
0
0
06H
07H
0
0
0
0
0
Day
Day
01–07
01–31
01–12
00–99
—
10 Date
Date
Month
Year
Date
5C/DS12R87
08H
0
10 Months
Month
Year
09H
10 Years
0AH
UIP
SET
IRQF
VRT
X
DV2
PIE
PF
0
DV1
AIE
AF
0
DV0
UIE
UF
0
RS3
RS2
RS1
RS0
DSE
0
Control
Control
Control
Control
RAM
0BH
SQWE
DM
0
24/12
—
0CH
0DH
0EH-7F
0
0
X
0
0
X
—
0
0
—
X
X
X
X
X
—
X = Read/Write Bit.
Note: Unless otherwise specified, the state of the registers is not defined when power is first applied. Except for the seconds regis-
ter, 0 bits in the time and date registers can be written to 1, but may be modified when the clock updates. 0 bits should always be
written to 0 except for alarm mask bits.
14
____________________________________________________________________