Communication Processor Module
16-460
MPC823e REFERENCE MANUAL
MOTOROLA
I
2
C
COMMUNICATION
16
PROCESSOR MODULE
16.13.3.1.2 Master Read.
To begin a read operation to a slave device that contains internal
addresses, you must prepare two TX buffers. TX buffer 0 must be 2 bytes long and TX buffer
1 must be N+1 bytes long, where N is the number of bytes to be read sequentially from the
slave device. You must also prepare one or more receive buffers for the N bytes of data to
receive from the slave device.
The first byte of TX buffer 0 must contain the 7-bit slave address followed by the write bit
asserted (R/W
= 0). The second byte of the first transmit buffer must contain the 1-byte
internal address on the slave device. This is the base address on the slave device of the
data to be read. The transmission of TX buffer 0 is commonly referred to as a dummy write.
Its purpose is to select the slave device.
The first byte of the second TX buffer (1) must contain the slave address followed by the
read bit asserted (R/W
= 1). The remaining N bytes of TX buffer 1 may be uninitialized and
merely serve as a placeholder for the I
2
C controller. The W, L and S bits must be set in the
TX buffer descriptor.
To begin a read operation to a slave device that does not contain internal addresses, you
must prepare a TX buffer of N+1 bytes long, where N is the number of bytes to be read
sequentially from the slave device. The first byte of the TX buffer must contain the 7-bit slave
address followed by the read bit asserted (R/W
= 1). You must also prepare one or more
receive buffers for the N bytes of data to receive from the slave device.
Figure 16-130. Byte Read from Device with Internal Addresses
Figure 16-131. Byte Read from Device without Internal Addresses
SDA
DEVICE ADDR
W
BASE ADDR
DATA BYTE
DEVICE ADDR
R
A
C
K
A
C
K
A
C
K
S
T
A
R
T
S
T
A
R
T
S
T
O
P
N
O
A
C
K
NOTE: DATA AND ACK ARE REPEATED N TIMES.
SDA
DATA BYTE
DEVICE ADDR
R
S
T
O
P
S
T
A
R
T
N
O
A
C
K
A
C
K
NOTE: DATA AND ACK ARE REPEATED N TIMES.