Functional Description
http://www.motorola.com/computer/literature 3-33
3
Figure 3-9. Programming Sequence for I2C Sequential ReadREAD
I2C
STATUS REG
CMPLT=1? N
Y
LOAD “WORD ADDR 1” TO
I2C
TRANSMITTER DATA REG
READ
I2C
STATUS REG
CMPLT=ACKIN=1? N
Y
LOAD “$09” (START CONDITION) TO
I2C
CONTROL REG
LOAD “DEVICE ADDR+WR BIT” TO
I2C
TRANSMITTER DATA REG
READ
I2C
STATUS REG
CMPLT=ACKIN=1? N
Y
LOAD “$05” (STOP CONDITION) TO
I2C
CONTROL REG
LOAD “DUMMY DATA” TO
I2C
TRANSMITTER DATA REG
READ
I2C
STATUS REG
CMPLT=1? N
Y
END
LOAD “$0B” (REPEATED START
CONDITION) TO
I2C
CONTROL REG
LOAD “DEVICE ADDR+RD BIT” TO
I2C
TRANSMITTER DATA REG
READ
I2C
STATUS REG
CMPLT=ACKIN=1? N
Y
LOAD “DUMMY DATA” TO
I2C
TRANSMITTER DATA REG
READ
I2C
STATUS REG
CMPLT=DATIN=1? N
Y
BEGIN
READ
I2C
RECEIVER DATA REG
START M
S
B
SDA
DEVICE ADDR
W
R
A
C
K
WORD ADDR 1
A
C
KSTART M
S
B
DEVICE ADDR
R
D
DATA n
N
O
A
C
K
STOP
ACK and DATA from Slave Devic
e
*
*
*
*
(*)
:
Stop condition should be generated to abort the transfer aft er a software wait loop (~1ms) has been expired
A
C
K
DATA 1
A
C
K
LAST BYTE ? N
Y
LAST BYTE - 1 ? Y
N
LOAD “$01” TO
I2C
CONTROL REG