298
Document # 001-20559 Rev. *D
I2C
28.3
Register Definitions
The following registers are associated with I2C and are listed in address order. Each register description has an associated
register table showing the bit structure for that register. The bits in the tables that are grayed out are reserved bits and are not
detailed in the register descriptions that follow. Reserved bits should always be written with a value of ‘0’. For a complete table
of I2C registers, refer to the
“Summary Table of the System Resource Registers” on page 272
28.3.1
I2C_CFG Register
The I2C Configuration Register (I2C_CFG) is used to set
the basic operating modes, baud rate, and selection of inter-
rupts.
The bits in this register control baud rate selection and
optional interrupts. The values are typically set once for a
given configuration. The bits in this register are all RW.
Bit 6: PSelect.
With the default value of zero, the I2C pins
are P1[7] for clock and P1[5] for data. When this bit is set,
the pins for I2C switch to P1[1] for clock and P1[0] for data.
This bit may not be changed while either the Enable Master
or Enable Slave bits are set. However, the PSelect bit may
be set at the same time as the enable bits. The two sets of
pins that may be used on I2C are not equivalent.
The default set, P1[7] and P1[5], are the preferred set. The
alternate set, P1[1] and P1[0], are provided so that I2C may
be used with 8-pin PSoC parts.
If In-System Serial Programming (ISSP) is used and the
alternate I2C pin set is also used, it is necessary to take into
account the interaction between the PSoC Test Controller
and the I2C bus. The interface requirements for ISSP should
be reviewed to ensure that they are not violated.
Even if ISSP is not used, pins P1[1] and P1[0] respond dif-
ferently to a POR or XRES event than other IO pins. After an
XRES event, both pins are pulled down to ground by going
into the resistive zero Drive mode, before reaching the High
Z Drive mode.After a POR event, P1[0] drives out a one,
then goes to the resistive zero state for some time, and
finally reaches the High Z Drive mode state. After POR,
P1[1] goes into a resistive zero state for a while, before
going to the High Z Drive mode.
Another issue with selecting the alternate I2C pins set is that
these pins are also the crystal pins. Therefore, a crystal may
not be used when the alternate I2C pin set is selected.
Bit 5: Bus Error IE (Interrupt Enable).
This bit controls
whether the detection of a bus error generates an interrupt.
A bus error is typically a misplaced start or stop.
This is an important interrupt with regards to master opera-
tion. When there is a misplaced start or stop on the I2C bus,
all slave devices (including this device, if Slave mode is
enabled) reset the bus interface and synchronize to this sig-
nal. However, when the hardware detects a bus error in
Master Mode operation, the device releases the bus and
transitions to an idle state. In this case, a master operation
in progress never has any further status or interrupts associ-
ated with it. Therefore, the master may not be able to deter-
mine the status of that transaction. An immediate bus error
interrupt informs the master that this transfer did not suc-
ceed.
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,D6h
PSelect
Bus Error IE
Stop IE
Clock Rate[1:0]
Enable
Master
Enable
Slave
RW : 00
Table 28-1. I2C_CFG Configuration Register
Bit
Access
Description
Mode
6
RW
I2C Pin Select
0 = P1[7], P1[5]
1 = P1[1], P1[0]
Master/
Slave
5
RW
Bus Error IE
Bus error interrupt enable.
0 = Disabled.
1 = Enabled. An interrupt is generated on the
detection of a Bus Error.
Master
Only
4
RW
Stop IE
Stop interrupt enable.
0 = Disabled.
1 = Enabled. An interrupt is generated on the
detection of a Stop Condition.
Master/
Slave
3:2
RW
Clock Rate
00 = 100K Standard Mode
01 = 400K Fast Mode
10 = 50K Standard Mode
11 = Reserved
Master/
Slave
1
RW
Enable Master
0 = Disabled
1 = Enabled
Master/
Slave
0
RW
Enable Slave
0 = Disabled
1 = Enabled
Master/
Slave
Summary of Contents for PSoC CY8C23533
Page 4: ...Contents Overview 4 Document 001 20559 Rev D Section G Glossary 385 Index 401 ...
Page 16: ...Contents Overview 16 Document 001 20559 Rev D ...
Page 24: ...24 Document 001 20559 Rev D Section A Overview ...
Page 30: ...30 Document 001 20559 Rev D Pin Information ...
Page 54: ...54 Document 001 20559 Rev D Supervisory ROM SROM ...
Page 60: ...60 Document 001 20559 Rev D RAM Paging ...
Page 68: ...68 Document 001 20559 Rev D Interrupt Controller ...
Page 76: ...12 Document 001 20559 Rev D General Purpose IO GPIO ...
Page 82: ...18 Document 001 20559 Rev D Internal Main Oscillator IMO ...
Page 84: ...20 Document 001 20559 Rev D Internal Low Speed Oscillator ILO ...
Page 90: ...26 Document 001 20559 Rev D External Crystal Oscillator ECO ...
Page 94: ...30 Document 001 20559 Rev D Phase Locked Loop PLL ...
Page 106: ...42 Document 001 20559 Rev D Sleep and Watchdog ...
Page 228: ...164 Document 001 20559 Rev D Section D Digital System ...
Page 234: ...170 Document 001 20559 Rev D Array Digital Interconnect ADI ...
Page 278: ...214 Document 001 20559 Rev D Digital Blocks ...
Page 296: ...232 Document 001 20559 Rev D Analog Interface ...
Page 304: ...240 Document 001 20559 Rev D Analog Array ...
Page 308: ...244 Document 001 20559 Rev D Analog Input Configuration ...
Page 312: ...248 Document 001 20559 Rev D Analog Reference ...
Page 338: ...274 Document 001 20559 Rev D Section F System Resources ...
Page 354: ...290 Document 001 20559 Rev D Multiply Accumulate MAC ...
Page 374: ...310 Document 001 20559 Rev D I2C ...
Page 400: ...336 Document 001 20559 Rev D Section G Glossary ...