© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
User manual
Rev. 01 — 15 August 2005
142
Philips Semiconductors
UM10139
Volume 1
Chapter 11: I
2
C interfaces
The contents of the I
2
C control register may be read as I2CONSET. Writing to I2CONSET
will set bits in the I
2
C control register that correspond to ones in the value written.
Conversely, writing to I2CONCLR will clear bits in the I
2
C control register that correspond
to ones in the value written.
11.6.9 Status decoder and Status register
The status decoder takes all of the internal status bits and compresses them into a 5-bit
code. This code is unique for each I
2
C-bus status. The 5-bit code may be used to
generate vector addresses for fast processing of the various service routines. Each
service routine processes a particular bus status. There are 26 possible bus states if all
four modes of the I
2
C block are used. The 5-bit status code is latched into the five most
significant bits of the status register when the serial interrupt flag is set (by hardware) and
remains stable until the interrupt flag is cleared by software. The three least significant bits
of the status register are always zero. If the status code is used as a vector to service
routines, then the routines are displaced by eight address locations. Eight bytes of code is
sufficient for most of the service routines (see the software example in this section).
11.7 Register description
Each I
2
C interface contains 7 registers as shown in
below.
[1]
Reset value reflects the data stored in used bits only. It does not include reserved bits content.
Table 135: I
2
C register map
Name
Description
Access Reset
value
I
2
C0 Address
and Name
I
2
C1 Address
and Name
I2CONSET
I
2
C Control Set Register. When a one is written to a bit
of this register, the corresponding bit in the I
2
C control
register is set. Writing a zero has no effect on the
corresponding bit in the I
2
C control register.
R/W
0x00
0xE001 C000
I2C0CONSET
0xE005 C000
I2C1CONSET
I2STAT
I
2
C Status Register. During I
2
C operation, this register
provides detailed status codes that allow software to
determine the next action needed.
RO
0xF8
0xE001 C004
I2C0STAT
0xE005 C004
I2C1STAT
I2DAT
I
2
C Data Register. During master or slave transmit mode,
data to be transmitted is written to this register. During
master or slave receive mode, data that has been
received may be read from this register.
R/W
0x00
0xE001 C008
I2C0DAT
0xE005 C008
I2C1DAT
I2ADR
I
2
C Slave Address Register. Contains the 7-bit slave
address for operation of the I
2
C interface in slave mode,
and is not used in master mode. The least significant bit
determines whether a slave responds to the general call
address.
R/W
0x00
0xE001 C00C
I2C0ADR
0xE005 C00C
I2C1ADR
I2SCLH
SCH Duty Cycle Register High Half Word. Determines
the high time of the I
2
C clock.
R/W
0x04
0xE001 C010
I2C0SCLH
0xE005 C010
I2C1SCLH
I2SCLL
SCL Duty Cycle Register Low Half Word. Determines
the low time of the I
2
C clock. I2nSCLL and I2nSCLH
together determine the clock frequency generated by an
I
2
C master and certain times used in slave mode.
R/W
0x04
0xE001 C014
I2C0SCLL
0xE005 C014
I2C1SCLL
I2CONCLR I
2
C Control Clear Register. When a one is written to a
bit of this register, the corresponding bit in the I
2
C control
register is cleared. Writing a zero has no effect on the
corresponding bit in the I
2
C control register.
WO
NA
0xE001 C018
I2C0CONCLR
0xE005 C018
I2C1CONCLR