UM10208_2
© NXP B.V. 2007. All rights reserved.
User manual
Rev. 02 — 1 June 2007
195 of 362
NXP Semiconductors
UM10208
Chapter 16: LPC2800 I
2
C
Section 16–8.3 “Master Transmit mode”
describes the software steps to use this mode.
5.2 Master Receive mode
In the master receive mode, the I
2
C interface receives data from a slave transmitter.
Software initiates the transfer by writing a byte to the Tx FIFO containing the slave
address with a 1 in the data direction bit. This byte is transmitted after a Start condition.
Software must write to the Tx FIFO for each byte to be received, to control when the I
2
C
interface sends Stop and repeated Start conditions.
If the interface loses bus arbitration to another master during the address/direction byte, it
will check the address/direction byte for a match with its slave address or the broadcast
address, and automatically enter slave transmit or slave receive mode if there’s a match.
For more about Master Receive mode, see
Section 16–8.4 “Master Receive mode”
5.3 Slave Receive mode
In the slave receive mode, the I
2
C interface receives data from an external master
transmitter. The interface is prepared for slave operation by writing its slave address to the
Slave Address Register and enabling the Receive FIFO Not Empty interrupt. If the ISR
reads an address/direction byte with a 1 in the direction bit, it subsequently reads data
from the Rx FIFO and stores it in a buffer for slave reception.
See
Section 16–8.6 “Slave Receive mode”
for more about this mode.
5.4 Slave Transmit mode
The interface is prepared for slave operation by writing its slave address to the Slave
Address Register and enabling the Receive FIFO Not Empty interrupt. If the ISR reads an
address/direction byte with a 0 in the direction bit, it writes data to the Slave Tx FIFO, from
which the I
2
C interfaces retrieves it, serializes it, and sends it on SDA under the control of
the serial clock on SCL.
Section 16–8.7 “Slave Transmit mode”
provides greater detail on this mode.
6.
Register description
2
C interface.