
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
402 of 808
1.
Basic configuration
The I
2
C0/1/2 interfaces are configured using the following registers:
1. Power: In the PCONP register (
), set bit PCI2C0/1/2.
Remark:
On reset, all I
2
C interfaces are enabled (PCI2C0/1/2 = 1).
2. Clock: In PCLKSEL0 select PCLK_I2C0; in PCLKSEL1 select PCLK_I2C1 or
PCLK_I2C2 (see
).
3. Pins: Select I
2
C0, I
2
C1, or I
2
C2 pins through the PINSEL registers. Select the pin
modes for the port pins with I
2
C1 or I
2
C2 functions through the PINMODE registers
(no pull-up, no pull-down resistors) and the PINMODE_OD registers (open drain)
(See
Remark:
I
2
C0 pins SDA0 and SCL0 are open-drain outputs and fully I
2
C-bus
2
C0 can be further configured through the I2CPADCFG
register to support Fast Mode Plus (See
).
Remark:
I
2
C0 is not available in the 80-pin package.
Remark:
I
2
C1 and I
2
C2 pins are not fully I
2
C-bus compliant open-drain pins but can
be configured to be open-drain via the PINMODE and PINMODE_OD registers. The
non-compliance is in the I
2
C-bus ability to turn off power to the device without pulling
down the I
2
C-bus itself.
4. Interrupts are enabled in the NVIC using the appropriate Interrupt Set Enable register.
5. Initialization: see
and
2.
Features
•
Standard I
2
C compliant bus interfaces may be configured as Master, Slave, or
Master/Slave.
•
Arbitration is handled between simultaneously transmitting masters without corruption
of serial data on the bus.
•
Programmable clock allows adjustment of I
2
C transfer rates.
•
Data transfer is bidirectional between masters and slaves.
•
Serial clock synchronization allows devices with different bit rates to communicate via
one serial bus.
•
Serial clock synchronization is used as a handshake mechanism to suspend and
resume serial transfer.
•
Supports Fast Mode Plus (I
2
C0 only).
•
Optional recognition of up to 4 distinct slave addresses.
•
Monitor mode allows observing all I
2
C-bus traffic, regardless of slave address, without
affecting the actual I
2
C-bus traffic.
•
The I
2
C-bus can be used for test and diagnostic purposes.
UM10360
Chapter 19: LPC17xx I2C0/1/2 interface
Rev. 00.06 — 5 June 2009
User manual