PNX1300/01/02/11 Data Book
Philips Semiconductors
16-4
PRELIMINARY SPECIFICATION
cates the microactivity of the I
2
C interface. The field val-
ues and their meanings are presented in
Table 16-5
The
DIRECTION status bit indicates if the
I
2
C
interface is in
transmit or receive mode.
if DIRECTION = 0 then I
2
C is a transmitter.
if DIRECTION = 1 then I
2
C is a receiver.
The RBC bitfield indicates the remaining bytecount for an
I
C
transfer in progress. The IIC_SR.RBC bitfield serves
as a read-only
‘
shadow register
’
for the IIC_AR.COUNT
bitfield. During
I
C
transfer, the RBC bitfield will reflect
the remaining bytecount. To avoid corrupting an
I
2
C
transfer, the DSPCPU must refrain from writing to the
IIC_AR.COUNT bitfield until a message is complete.
Completion is indicated by the RBC bitfield decrementing
to zero.
16.4.4
The I
2
C control register contains control information re-
quired for enabling
I
2
C
transfers. This register is used to
enable and clear interrupt sources which normally occur
during
I
2
C
operation. The four interrupt sources de-
scribed in the section on the IIC_SR register are enabled
and cleared through the IIC_CR register. The enable bit-
fields are:
IIC_CR Register
GD_IEN
—
Enable for normal transfer complete
interrupt.
F_IEN
—
Enable for IIC_DR data service request
interrupt.
SANACK_IEN
—
Enable for slave address not
acknowledged interrupt. This is an error interrupt.
SDNACK_IEN
—
Enable for slave data not acknowl-
edged interrupt. An addressed slave receiver has
refused to accept the last byte transmitted to it. This
is handled as an error interrupt.
In addition to the interrupt enable bits, the IIC_CR con-
tains interrupt clear bits associated with each of the inter-
rupt sources in the IIC_SR register. These IIC_CR inter-
rupt clear bits are defined as:
CLRGDI
—
Clear bit for the GDI interrupt in the
IIC_SR register. Writing a
‘
1
’
to this bit clears the GDI
interrupt.
CLRFI
—
Clear bit for the FI interrupt in the IIC_SR
register. Writing a
‘
1
’
to this bit clears the FI interrupt.
CLRSANACKI
—
Clear bit for the SANACKI inter-
rupt in the IIC_SR register. Writing a
‘
1
’
to this bit
clears the SANACKI interrupt.
CLRSDNACKI
—
Clear bit for the SDNACKI inter-
rupt in the IIC_SR register. Writing a
‘
1
’
to this bit
clears the SDNACKI interrupt.
The remaining bitfield of the IIC_CR register is:
ENABLE
—
Master enable for I
2
C serial interface.
ENABLE must be set equal to
‘
1
’
to transfer any bits
from the I
2
C interface block. Writing a
‘
0
’
to the
Table 16-7. IIC_CR Register
Bits
Field Name
Definition
31
GD_IEN
Enable for normal transfer complete
interrupt
Enable for IIC_DR data service
request interrupt
Enable for slave address not
acknowledged interrupt
Enable for slave data not acknowl-
edged interrupt. An addressed slave
receiver has refused to accept the
last byte transmitted to it
Always write
‘
0
’
s to these bits.
(See Note1)
Clear bit for the GDI interrupt in the
IIC_SR register. Writing a
‘
1
’
to this
bit clears the GDI interrupt
Clear bit for the FI interrupt in the
IIC_SR register. Writing a
‘
1
’
to this
bit clears the FI interrupt
Clear bit for the SANACKI interrupt
in the IIC_SR register. Writing a
‘
1
’
to
this bit clears the SANACKI interrupt.
Clear bit for the SDNACKI interrupt
in the IIC_SR register. Writing a
‘
1
’
to
this bit clears the SDNACKI inter-
rupt.
Always write
‘
0
’
s to these bits.
(See Note1)
30
F_IEN
29
SANACK_IEN
28
SDNACK_IEN
27:26
Reserved1
25
CLRGDI
24
CLRFI
23
CLRSANACKI
22
CLRSDNACKI
21:6
Reserved2
10
SW_MODE_EN 0 (power-on/reset default) - Normal
I2C hardware operating mode.
1 - Enable software operating mode.
The I
2
C pins are entirely controlled
by user writes to the
‘
sda_out
’
and
‘
scl_out
’
register bits.
SDA_OUT
Enabled by sw_mode_en. This bit is
used by sw to manually control the
external I
2
C SDA data pin. Bit polar-
ity is:
1 = SDA pad pulled low
0 = SDA pad left open drain
SCL_OUT
Enabled by sw_mode_en. This bit is
used by sw to manually control the
external I
2
C SCL clock pin. Bit polar-
ity is:
1 = SCL pad pulled low
0 = SCL pad left open drain
Reserved3
Always write
‘
0
’
s to these bits.
(See Note1)
Reserved4
Always write
‘
0
’
s to these bits.
(See Note1)
ENABLE
I
2
C serial interface enable
7
6
5:2
1
0
Table 16-7. IIC_CR Register (Continued)
Bits
Field Name
Definition