
AN-895
Rev. 0 | Page 6 of 16
Clock Stretching
In an I
2
C communication, the master device determines the
clock speed. Unlike RS232, the I
2
C bus provides an explicit
clock signal that relieves master and slave from synchronizing
exactly to a predefined baud rate.
However, there are situations where an I
2
C slave is not able to
cooperate with the clock speed given by the master and needs to
slow down a little. This is done by a mechanism referred to as
clock stretching.
An I
2
C slave is allowed to hold down the clock if it needs to
reduce the bus speed. The master, on the other hand, is required
to read back the clock signal after releasing it to a high state and
wait until the line has actually gone high.
Bit 11 of the I2CxCFG MMR allows clock stretching.
SERIAL EEPROM PROTOCOLS
The ATMEL AT24C series serial EEPROM supports five
commands:
• Random write
• Sequential write
• Current address read
• Random read
• Sequential read
These five commands are described in
Figure 7 through
Figure 11.
0
6
5
4
9
-
0
0
6
START
DEVICE
ADDRESS
WRITE
WORD ADDRESS DATA
STOP
SDA LINE
MSB
LSB
R/W
ACK
LSB
ACK
MSB
ACK
Figure 7. Random Write
0
6
5
4
9
-
0
0
7
START
DEVICE
ADDRESS
WRITE
WORD ADDRESS (n) DATA (n)
SDA LINE
MSB
R/W
ACK
LSB
ACK
MSB
ACK
DATA (n + 1)
ACK
DATA (n + x)
STOP
ACK
Figure 8. Sequential Write
0
6
5
4
9
-
0
0
8
START
DEVICE
ADDRESS
READ
STOP
DATA
SDA LINE
MSB
R/W
ACK
LSB
NO ACK
Figure 9. Current Read
0
6
5
4
9
-
0
0
9
START
DEVICE
ADDRESS
WRITE
WORD ADDRESS (n)
SDA LINE
MSB
LSB
R/W
ACK
LSB
ACK
MSB
START
STOP
DEVICE
ADDRESS
READ
MSB
ACK
LSB
NO ACK
DATA (n)
DUMMY WRITE
Figure 10. Random Read
0
6
5
4
9
-
0
1
0
READ
DEVICE
ADDRESS
SDA LINE
ACK
NO ACK
ACK
ACK
ACK
STOP
R/W
DATA (n + 2) DATA (n + x)DATA (n + 1)DATA (n)
Figure 11. Sequential Read
Comentarios a estos manuales