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
UM10316_0
© NXP B.V. 2008. All rights reserved.
User manual
Rev. 00.06 — 17 December 2008
399 of 571
NXP Semiconductors
UM10316
Chapter 23: LPC2xx I2C-interface
9.
Details of I
2
C operating modes
The four operating modes are:
•
Master Transmitter
•
Master Receiver
•
Slave Receiver
•
Slave Transmitter
Data transfers in each mode of operation are shown in Figures
lists abbreviations used in these figures when describing the I
2
C operating modes.
In Figures
, circles are used to indicate when the serial interrupt flag is set. The
numbers in the circles show the status code held in the I2STAT register. At these points, a
service routine must be executed to continue or complete the serial transfer. These
service routines are not critical since the serial transfer is suspended until the serial
interrupt flag is cleared by software.
When a serial interrupt routine is entered, the status code in I2STAT is used to branch to
the appropriate service routine. For each status code, the required software action and
details of the following serial transfer are given in tables from
9.1 Master Transmitter mode
In the master transmitter mode, a number of data bytes are transmitted to a slave receiver
(see
). Before the master transmitter mode can be entered, I2CON must be
initialized as follows:
Table 334. I
2
C Mask registers (I2MASK0 to 3: I2C0, I2C0MASK[0, 1, 2, 3] - 0xE008 20[30, 34,
38, 3C]; I2C1, I2C1MASK[0, 1, 2, 3] - address 0xE008 30[30, 34, 38, 3C]) bit
description
Bit Symbol
Description
Reset value
0
-
Reserved. User software should not write ones to reserved bits.
This bit reads always back as 0.
0
7:1 MASK
Mask bits.
0x00
31:
8
-
Reserved. User software should not write ones to reserved bits.
These bits read always back as 0’s.
0
Table 335. Abbreviations used to describe an I
2
C operation
Abbreviation
Explanation
S
Start Condition
SLA
7 bit slave address
R
Read bit (high level at SDA)
W
Write bit (low level at SDA)
A
Acknowledge bit (low level at SDA)
A
Not acknowledge bit (high level at SDA)
Data
8 bit data byte
P
Stop condition