Motorola MPC823e Reference Manual page 914

Microprocessor for mobile computing
Table of Contents

Advertisement

Communication 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
TX buffer descriptor.
S
T
A
R
T
SDA
DEVICE ADDR
NOTE: DATA AND ACK ARE REPEATED N TIMES.
Figure 16-130. Byte Read from Device with Internal Addresses
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.
SDA
NOTE: DATA AND ACK ARE REPEATED N TIMES.
Figure 16-131. Byte Read from Device without Internal Addresses
16-460
2
C controller. The W, L and S bits must be set in the
S
T
A
R
A
A
T
C
C
W
K
BASE ADDR
K
S
T
A
R
A
T
C
K
DEVICE ADDR
R
MPC823e REFERENCE MANUAL
A
C
DATA BYTE
DEVICE ADDR
R
K
N
O
S
A
T
C
O
K
P
DATA BYTE
N
O
S
A
T
C
O
K
P
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents