
Communication Processor Module
MOTOROLA
MPC823 USER’S MANUAL
16-449
I2
C
COMMUNICATION
16
PROCESSOR
MODULE
16.13.3.1.1 Master Write. To begin a write operation to a slave device that contains
internal addresses, you need to prepare a TX data buffer that is N+2 bytes in length. The
first byte contains the 7-bit device address, followed by the write bit asserted (R/W = 0). The
second byte contains the internal base address of the write. The remaining N bytes contain
the data to be written to the slave. The slave device will process the N bytes of data
sequentially, starting at the specified base address.
To begin a master write operation to a slave device that does not contain internal addresses,
you need to prepare a TX data buffer that is N+1 bytes in length. The first byte contains the
7-bit slave device address, followed by the write bit asserted (R/W = 0). The remaining N
bytes contain the data to be written to the slave.
Next, when communicating to either slave device, the TX buffer descriptor’s control and
status field must have the W and L bits set. Set the I bit in the TX buffer descriptor to enable
the transmission status to be updated in the I2CE register, and to enable I2C interrupts to
the core. Set the R-bit in the TX buffer descriptor to prepare the buffer for transmission. The
final step is to set the STR bit in the I2COM register to initiate transmission. The data starts
transmitting once the SDMA channel loads the transmit FIFO with data and the I2C bus is
not busy.
Figure 16-126. Byte Write to Device with Internal Addresses
Figure 16-127. Byte Write to Device without Internal Addresses
Note: Some slave devices such as serial E2PROMs may have a minimum write cycle
time. For these devices, the I2C controller must wait a specified minimum time
after a write before initiating a subsequent read or write. The needed delay must
be implemented in software.
SDA
DEVICE ADDR
W
BASE ADDR
DATA BYTE
A
C
K
A
C
K
A
C
K
S
T
A
R
T
S
T
O
P
NOTE: DATA AND ACK ARE REPEATED N TIMES.
SDA
DEVICE ADDR
W
DATA BYTE
S
T
A
R
T
S
T
O
P
A
C
K
A
C
K
NOTE: DATA AND ACK ARE REPEATED N TIMES.