UM10237_2 © NXP B.V. 2008. All rights reserved.
User manual Rev. 02 — 19 December 2008 572 o f 792
1. Basic configuration
The I2C0/1/2 interfaces are configured using the following registers:
1. Power: In the PCONP register (Tab le 4– 63), set bit PCI2C0/1/2.
Remark: On reset, all I2C interfaces are enabled (PCI2C0/1/2 = 1).
2. Clock: In PCLK_SEL0 select PCLK_I2C0; in PCLK_SEL1 select PCLK_I2C1/2 (see
Section 4–3.3.4.
3. Pins: Select I2C pins and their modes in PINSEL0 to PINSEL4 and PINMODE0 to
PINMODE4 (see Section 9–5).
Remark: I2C0 pins SDA0 and SCL0 are open-drain outputs for I2C-bus compliance
(see Section 9–5.14).
4. Interrupts are enabled in the VIC using the VICIntEnable register (Table 7–106).
5. Initialization: see Section 22–10.1 and Section 22–9.12.1.
2. Features
Standard I2C compliant bus interfaces that may be configured as Master, Slave, or
Master/Slave.
Arbitration between simultaneously transmitting masters without corruption of serial
data on the bus.
Programmable clock to allow adjustment of I2C transfer rates.
Bidirectional data transfer between masters and slaves.
Serial clock synchronization allows devices with different bit rates to communicate via
one serial bus.
Serial clock synchronization can be used as a handshake mechanism to suspend and
resume serial transfer.
The I2C bus may be used for test and diagnostic purposes.
3. Applications
Interfaces to external I2C standard parts, such as serial RAMs, LCDs, tone generators,
etc.
4. Description
A typical I2C bus configuration is shown in Figure 22–111. Depending on the state of the
direction bit (R/W), two types of data transfers are possible on the I2C bus:
Data transfer from a master transmitter to a slave receiver. The first byte transmitted
by the master is the slave address. Next follows a number of data bytes. The slave
returns an acknowledge bit after each received byte.
UM10237
Chapter 22: LPC24XX I2C interfaces I2C0/1/2
Rev. 02 — 19 December 2008 User manual