MAX6917
I
2
C-Compatible RTC with Microprocessor
Supervisor, Alarm, and NV RAM Controller
16 ______________________________________________________________________________________
current time by an incomplete write operation, the cur-
rent time value is buffered from being written directly to
the clock counters. The new data sent replaces the cur-
rent contents of this input buffer. This time update data
is loaded into the clock counters after the stop bit at the
end of the I
2
C bus write operation. Collision-detection
circuitry ensures that this does not happen coincident
with a seconds-counter update to guarantee that accu-
rate time data is being written. This avoids time data
changes during a write operation. An incomplete write
operation aborts the time-update procedures and the
contents of the input buffer are discarded. The clock
counters reflect the new time data beginning with the
first 1s clock cycle after the stop bit. The clock counter
is reset immediately after a write to the seconds regis-
ter or a burst write to the timekeeping registers. This
ensures that 1s clock tick is synchronous to timekeep-
ing writes.
If single-write operations (Figure 9) are used to write to
each of the timekeeping registers, then error checking is
needed. If the seconds register is the one to be updat-
ed, update it first and then read it back and store its
value as the initial seconds. Update the remaining time-
keeping registers and then read the seconds register
again (final seconds). If initial seconds was 59, ensure it
is still 59. If initial seconds was not 59, ensure that final
seconds is within 1s of initial seconds. If the seconds
register is not to be written to, then read the seconds
register first and save it as initial seconds. Write to the
required timekeeping registers and then read the sec-
onds register again (final seconds). If initial seconds
was 59, ensure it is still 59. If initial seconds was not 59,
ensure that final seconds is within 1s of initial seconds.
Although both single writes and burst writes are possi-
ble, the most accurate way to write to the timekeeping
counters is to do a burst write (Figure 9). In the burst
write, the main timekeeping registers (seconds, min-
utes, hours, date, month, day, year) and the control
register are written sequentially. They must be all writ-
ten to as a group of eight registers, with 8 bytes each,
for proper execution of the burst-write function. All
seven timekeeping registers and the control register
are simultaneously loaded into the input buffer at the
end of the 2-wire bus write operation. The worst-case
error that can occur between the actual time and the
write time update is 1s.
To avoid rollover issues when writing time data to the
MAX6917, the remaining time and date registers must
be written within 1s of updating the seconds register
when using single writes. For burst writes, all eight reg-
isters must be written within this period (1s).
The weekday data in the day register increments at
midnight. Values that correspond to the day of the
week are user defined, but must be sequential (i.e., if 1
equals Sunday, then 2 equals Monday, and so on). If
invalid values are written to the timekeeping registers,
the operation becomes undefined.
Timeout Feature
The purpose of the bus timeout feature is to reset the seri-
al bus interface and change the SDA line of the MAX6917
from an output to an input, which puts the SDA line into a
high-impedance state. This is necessary when the
MAX6917 is transmitting data and becomes stuck at a
logic-low level. If the SDA line is stuck low, any other
device on the bus is not able to communicate.
The timeout feature looks for a valid START and STOP
condition to determine whether SDA has been stuck
low. A valid START condition initiates the timeout
counter in reference to the internal 1Hz clock. Counting
begins on the first rising edge of the 1Hz clock after a
valid START condition. If a valid STOP condition is
detected before the next rising edge of the 1Hz clock,
the timeout counter is stopped and awaits a new valid
START condition. If a valid STOP condition is not
detected before the next rising edge of the 1Hz clock,
the I
2
C interface resets to the idle state and waits for a
new I
2
C transaction. Depending on the occurrence of
the START condition, that initiates the timeout counter,
in reference to the internal 1Hz clock, the timeout peri-
od can be 1s to 2s. The lower limit of the timeout period
(1s) imposes a limit on the SCL frequency of the
MAX6917 because a burst read/write requires up to 96
bytes of information to be transmitted in between a
START and STOP condition.
MAX6917
I
2
C-Compatible RTC with Microprocessor
Supervisor, Alarm, and NV RAM Controller
______________________________________________________________________________________ 17
Registers
Tables 1 and 2 show the register map, as well as the
register descriptions for the MAX6917.
Control Register
The control register contains bits for configuring the
MAX6917 for custom applications. Bit D0 (BATT ON
BLINK) and D1 (BATT LO BLINK) are used to enable a
1Hz blink rate on BATT_ON and BATT_LO when they
are active; see the Battery Test section for details. D2
(WD TIME) and D3 (WD EN) are used to enable the
watchdog function and select its timeout. For details,
see the Watchdog Input section. D5 (INT/EXT TEST)
sets whether the internal resistor ratio or an external
resistor ratio is to be used to check for the low-battery
condition; see the Battery Test section for details. D6
(XTAL EN) enables the crystal-fail-detect circuitry when
set. See the Crystal-Fail Detect section for details. D7
(WP) is the write protect bit. Before any write operation
to the registers (except the control register) or RAM, bit
7 must be zero. When set to one, the write-protect bit
prevents write operations to any register (except the
control register) or RAM location.
Timekeeping and Alarm Thresholds Registers
Time and date data is stored in the timekeeping and
alarm threshold registers in BCD format as shown in Table
1. The weekday data in the day register is user defined (a
common format is 1 = Sunday, 2 = Monday, etc.)
AM/PM and 12hr/24hr Mode
For both timekeeping and alarm threshold registers
(Table 1), D7 of the hours register is defined as the
12hr or 24hr mode-select bit. When set to one, the 12hr
mode is selected. In the 12hr mode, D5 is the AM/PM
bit with logic one being PM. In the 24hr mode, D5 is the
second 10hr bit (20hr to 23hr).
Clock-Burst Mode
Addressing the clock-burst register specifies burst-
mode operation. In this mode, the first eight clock/cal-
endar registers (seven timekeeping and the control
register) can be consecutively read or written to by
using the address/command byte 00h for a write or 01h
for a read (Table 1). If the write-protect bit is set to one
when a write-clock/calendar-burst mode is specified,
no data transfer occurs to any of the seven timekeeping
registers or the control register. When writing to the
clock/calendar registers in the burst mode, the first
eight registers must be written to for the data to be
transferred.
RAM
The static RAM consists of 96 x 8 bits addressed con-
secutively in the RAM address/command space. Even
address/commands (3Eh to FCh) are used for RAM
writes and odd address/commands (3Fh to FDh) are
used for RAM reads (Table 2).
RAM-Burst Mode
Sending the RAM-burst address/command (FEh for
write, FFh for read) specifies burst-mode operation. In
this mode, the 96 RAM locations can be consecutively
read or written to starting with bit 7 of address/com-
mand 3Eh for writes, and 3Fh for reads. A burst read
outputs all 96 bytes of RAM. When writing to RAM in
burst mode, it is not necessary to write all 96 bytes for
the data to transfer; each complete byte written is
transferred to the RAM. When reading from RAM, data
are output until all 96 bytes have been read, or until the
data transfer is stopped by the I
2
C master.
Status Register
The status register contains individual bits for monitor-
ing the status of several functions of the MAX6917. Bits
D0D3 are unused and always read zero (Table 1). D4
(ALM OUT) reflects the state of the alarm function; see
the Alarm-Generation Function section for details. D5
(BATT LO) indicates the state of the battery connected
to V
BATT
; see the Battery Test section for more informa-
tion. D6 (DATA VALID) alerts the user if all power was
lost. See the Data Valid Bit section for details. D7 (XTAL
FAIL) is the output of the crystal-fail detect circuit. See
the Crystal-Fail Detect section for details.
MAX6917
I
2
C-Compatible RTC with Microprocessor
Supervisor, Alarm, and NV RAM Controller
18 ______________________________________________________________________________________
Table 1. Register Map
CLOCK
BURST
0
000000
A0A1A2A3A4A5A6
A7FUNCTION
D0D1D2D3D4D5D6
D7
0000000
VALUE
000000
0
10 SEC 1 SEC
0–59
POR STATE
SEC
0000000
00000
1
0
0
10 MIN 1 MIN
0–59
POR STATE
MIN
0
000 0
00000
1
0
12/24
10 HR
1 HR
00–23
POR STATE
HR
AM/
PM
10 HR
000
01–12
0000000
0000
1
0
1
0 10 DATE 1 DATE
01–28/29
01–30/31
POR STATE
DATE
0000000
0000
1
0
1
0
10 M
1 MONTH
01–12
POR STATE
MONTH
00
0000000
0000
11
1
0
WEEKDAY
01–07
POR STATE
DAY
0000
0111000
0000
11
0
1 YEAR
00–99
POR STATE
YEAR
10 YEAR
001 0
000
1
00
1
WP
POR STATE
CONTROL
INT/
EXT
TEST
000
XTAL
EN
0
WD
EN
WD
TIME
BATT
LO
BLINK
BATT
ON
BLINK
0001100
000
1
00
1
100 YEAR
00–99
POR STATE
CENTURY
1000 YEAR
000 0
000
1
0
1
0
ONE
SEC
POR STATE
ALARM
CONFIGURATION
DAY
000
YEAR
MONTH
DATE HR MIN SEC
011 0
000
11
0
0
32kHz
V
CC
EN
32kHz
V
BATT
EN
1kHz
V
CC
EN
1kHz
V
BAT
EN
POR STATE
STATUS
000
0000
000 0
0
XTAL
FAIL
POR STATE
BATT
LO
000
DATA
VALID
ALM
OUT
0000
0
REGISTER ADDRESS
REGISTER FUNCTION
0
POR STATE DEFINES THE POWER-ON RESET STATE OF THE REGISTER.
R
W
1
R
W
R
W
R
W
R
W
R
W
R
W
R
W
R
W
0
1
0
1
0
1
0
R
W
R
W
R
W
1
0
0
11
0
10
0
FOUT
CONFIGURATION
R
W
0

MAX6917EO30+

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
IC RTC I2C COMPAT 20-QSOP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union