MAX6917
I
2
C-Compatible RTC with Microprocessor
Supervisor, Alarm, and NV RAM Controller
______________________________________________________________________________________ 13
To maximize battery life and prevent erroneous data
from being entered into the MAX6917, the serial bus
interface is disabled when V
CC
is below V
RST
. If the
SDA or SCL serial interface lines are held low for longer
than 1s to 2s, the serial bus interface resets and awaits
for a new START condition (see the START and STOP
Conditions section).
I
2
C System Configuration
A device on the I
2
C-compatible bus that generates a
message is called a transmitter and a device that
receives the message is called a receiver. The device
that controls the message is the master and the
devices that are controlled by the master are called
slaves (Figure 3). The word message refers to data in
the form of three 8-bit bytes for a single read or write.
The first byte is the slave ID byte, the second byte is
the address/command byte, and the third is the data.
START and STOP Conditions
Data transfer can only be initiated when the bus is not
busy (both SDA and SCL are high). A high-to-low tran-
sition of SDA while SCL is high defines a START (S)
condition; low-to-high transition of SDA while SCL is
high defines a STOP (P) condition (Figures 2, 4). Any
time a START condition occurs, the slave ID must follow
immediately, regardless of completion of a previous
data transfer.
Bit Transfer
After the START condition occurs, 1 bit of data is trans-
ferred for each clock pulse. The data on SDA must
remain stable during the high portion of the clock pulse
as changes in data during this time are interpreted as a
control signal (Figure 5).
Acknowledge
The acknowledge bit is a clocked 9th bit that the recipi-
ent uses to handshake receipt of each byte of data
(Figure 6). Thus, each byte transferred effectively
requires 9 bits. The master generates the 9th clock
pulse, and the recipient pulls down SDA during the
acknowledge clock pulse, such that the SDA line is sta-
ble low during the high portion of the clock pulse. A
master receiver must signal an end of data to the trans-
mitter by not generating an acknowledge on the last
byte that has been clocked out of the slave. In this
case, the transmitter must leave the SDA high to enable
the master to generate a STOP condition. If a STOP
condition is received before the current byte of data
transfer is completed in burst mode, the last incomplete
byte is ignored if it is a burst transaction to RAM or the
whole burst transaction is ignored if it is a burst trans-
action to the timekeeping registers. There is no limit to
the number of bytes that can be transmitted between a
START and a STOP condition.
Slave Address
Before any data is transmitted on the I
2
C-bus-compati-
ble serial interface, the device that is expected to
respond must be addressed first. The first byte sent
after the START (S) condition is the address byte or 7-
bit slave ID. The MAX6917 acts as a slave trans-
mitter/receiver. Therefore, SCL is only an input clock
signal and SDA is a bidirectional data line. The slave
address for the MAX6917 is shown in Figure 7.
SDA
SCL
t
F
t
R
t
LOW
t
SU:DAT
t
F
t
HD:STA
t
HD:DAT
t
HIGH
t
SU:STA
t
HD:STA
t
SP
t
SU:STO
t
R
t
BUFF
P
S
S
Sr
S = START CONDITION
P = STOP CONDITION
Sr = REPEATED START CONDITION
Figure 2. I
2
C Communication Timing Diagram
MAX6917
I
2
C-Compatible RTC with Microprocessor
Supervisor, Alarm, and NV RAM Controller
14 ______________________________________________________________________________________
Address/Command Byte
The second byte of data sent after the START condition
is the address/command byte (Figure 8). Each data
transfer is initiated by an address/command byte. Bits
71 specify the designated register or RAM location to
be read or written to, and the LSB (bit 0) specifies a
write operation if logic zero or a read operation if logic
one. The command byte is always input starting with
the MSB (bit 7).
Reading from the Timekeeping Registers
The timekeeping registers (seconds, minutes, hours,
date, month, day, and year) and the control register
can be read either with a single read or a burst read
(Figure 9). Since the RTC runs continuously and a read
takes a finite amount of time, there is the possibility that
the clock counters could change during a read opera-
tion, thereby reporting inaccurate timekeeping data. In
the MAX6917, each clock counters data is buffered by
a latch. Clock counter data is latched by the I
2
C bus
read command (on the falling edge of SCL when the
slave acknowledge bit is sent, after the address/com-
mand byte has been sent by the master to read a time-
keeping register). Collision-detection circuitry ensures
that this does not happen coincident with a seconds
counter update to ensure accurate time data is being
read. This avoids time-data changes during a read
operation. The clock counters continue to count and
keep accurate time during the read operation.
If single reads are used to read each of the timekeep-
ing registers individually, then it is necessary to do
some error checking on the receiving end. An error can
occur when the seconds counter increments before all
the other registers are read out. For example, suppose
a carry of 13:59:59 to 14:00:00 occurs during single-
read operations of the timekeeping registers. Then the
net data could become 14:59:59, which is erroneous
real-time data. To prevent this with single-read opera-
tions, read the seconds register first (initial seconds)
and store this value for future comparison. When the
remaining timekeeping registers have been read out,
read the seconds register again (final seconds). If the
initial seconds value is 59, check that the final-seconds
value is still 59; if not, repeat the entire single-read
process for the timekeeping registers. A comparison of
the initial-seconds value with the final-seconds value
can indicate if there was a bus-delay problem in read-
ing the timekeeping data (difference should always be
1s or less). Using a 100kHz bus speed, and sequential
single reads, it would take under 2.5ms to read all
seven of the timekeeping registers plus a second read
of the seconds register.
The most accurate way to read the timekeeping regis-
ters is to perform a burst read. With burst reads, the
main timekeeping registers (seconds, minutes, hours,
date, month, day, year) and the control register are
read sequentially, in the order listed with the seconds
register first. They must be all read out as a group of
SDA
SCL
MASTER
TRANSMITTER/
RECEIVER
SLAVE
RECEIVER
SLAVE
TRANSMITTER/
RECEIVER
MASTER
TRANSMITTER
MASTER
TRANSMITTER/
RECEIVER
Figure 3. I
2
C System Configuration
SDA
SCL
START
CONDITION
STOP
CONDITION
SP
Figure 4. START and STOP Conditions
SDA
SCL
DATA LINE
STABLE;
DATA VALID
CHANGE OF
DATA
ALLOWED
Figure 5. Bit Transfer
SCL
SDA
BY TRANSMITTER
CLOCK PULSE FOR
ACKNOWLEDGE
START
CONDITION
SDA
BY RECEIVER
12 89
S
Figure 6. Acknowledge
eight registers, with 8 bytes each, for proper execution
of the burst-read function. All seven timekeeping regis-
ters are latched upon the receipt of the burst-read com-
mand. The worst-case error that can occur between the
actual time and the read time is 1s.
Writing to the Timekeeping Registers
The time and date can be set by writing to the time-
keeping registers (seconds, minutes, hours, date,
month, day, year, and century). To avoid changing the
MAX6917
I
2
C-Compatible RTC with Microprocessor
Supervisor, Alarm, and NV RAM Controller
______________________________________________________________________________________ 15
SDA
SCL
11 10 0 00R/W
MSB LSB
ACK
Figure 7. MAX6917 Slave Address
A7 A6 A5 A4 A3 A2 A1 R/W
BIT 7 BIT 0
Figure 8. Address/Command Byte
Figure 9. Read and Write Operations
R/W
R/W
R/W
R/W
R/W
1
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
ACKNOWLEDGE
FROM SLAVE
1010000
0ADDR 8-BIT DATA P
11010000
1ADDR 8-BIT DATA
NO ACKNOWLEDGE
FROM MASTER
NO ACKNOWLEDGE
FROM MASTER
P
Sr
11010001
11010000
0ADDR
LAST 8-BIT DATA
S
P
11010000
1ADDRSSr
FIRST 8-BIT DATA
FIRST 8-BIT DATA
ACKNOWLEDGE
FROM MASTER
11010001
R/W
LAST 8-BIT DATA
P
SINGLE WRITE
SINGLE READ
BURST WRITE
BURST READ
START CONDITION
START CONDITION
START CONDITION
START CONDITION
REPEATED START CONDITION
STOP CONDITION
STOP CONDITION
STOP CONDITION
REPEATED START CONDITION
ADDR = 7-BIT RAM OR REGISTER ADDRESS
S = START CONDITION
Sr = REPEATED START CONDITION
P = STOP CONDITION
A
S
= ACKNOWLEDGE FROM SLAVE
A
M
= ACKNOWLEDGE FROM MASTER
A
M
= NOT ACKNOWLEDGE FROM MASTER
A
S
A
S
A
S
A
S
A
S
A
S
A
S
A
S
A
S
A
S
A
S
A
S
A
M
A
M
A
M
A
S
S
S

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