Document # 001-20559 Rev. *D
295
28.
I
2
C
This chapter explains the I
2
C™ block and its associated registers. The I2C communications block is a serial processor
designed to implement a complete I2C slave or master. For a complete table of the I2C registers, refer to the
of the System Resource Registers” on page 272
. For a quick reference of all PSoC registers in address order, refer to the
Register Details chapter on page 47
28.1
Architectural Description
The I2C communications block is a serial to parallel proces-
sor, designed to interface the PSoC device to a two-wire I2C
serial communications bus. To eliminate the need for exces-
sive M8C microcontroller intervention and overhead, the
block provides I2C-specific support for status detection and
generation of framing bits.
The I2C block directly controls the data (SDA) and clock
(SCL) signals to the external I2C interface, through connec-
tions to two dedicated GPIO pins. The PSoC device firm-
ware interacts with the block through IO (input/output)
register reads and writes, and firmware synchronization is
implemented through polling and/or interrupts.
PSoC I2C features include:
■
Master/slave, transmitter/receiver operation
■
Byte processing for low CPU overhead
■
Interrupt or polling CPU interface
■
Master clock rates: 50K, 100K, 400K
■
Multi-master clock synchronization
■
Multi-master mode arbitration support
■
7- or 10-bit addressing (through firmware support)
■
SMBus operation (through firmware support)
Hardware functionality provides basic I2C control, data, and
status primitives. A combination of hardware support and
firmware command sequencing provides a high degree of
flexibility for implementing the required I2C functionality.
Hardware limitations in regards to I2C are as follows:
1. There is no hardware support for automatic address
comparison. When Slave mode is enabled, every slave
address causes the block to interrupt the PSoC device
and possibly stall the bus.
2. Since receive and transmitted data are not buffered,
there is no support for automatic receive acknowledge.
The M8C microcontroller must intervene at the boundary
of each byte and either send a byte or ACK received
bytes.
The I2C block is designed to support a set of primitive oper-
ations and detect a set of status conditions specific to the
I2C protocol. These primitive operations and conditions are
manipulated and combined at the firmware level to support
the required data transfer modes. The CPU sets up control
options and issue commands to the unit through IO writes
and obtains status through IO reads and interrupts.
The block operates as either a slave, a master, or both.
When enabled in Slave mode, the unit is always listening for
a start condition, or sending or receiving data. Master mode
works in conjunction with Slave mode. The master supplies
the ability to generate the start or stop condition and deter-
mine if other masters are on the bus. For Mult-Master mode,
clock synchronization is supported. If Master mode is
enabled and Slave mode is not enabled, the block does not
generate interrupts on externally generated start conditions.
28.1.1
Basic I
2
C Data Transfer
shows the basic form of data transfers on the
I2C bus with a 7-bit address format. (For a more detailed
description, see the Phillips Semiconductors’ I
2
C™ Specifi-
cation, version 2.1.)
A start condition (generated by the master) is followed by a
data byte, consisting of a 7-bit slave address (there is also a
10-bit address mode) and a Read/Write (RW) bit. The RW
bit sets the direction of data transfer. The addressed slave is
required to acknowledge (ACK) the bus by pulling the data
line low during the ninth bit time. If the ACK is received, the
transfer proceeds and the master transmits or receives an
indeterminate number of bytes, depending on the RW direc-
tion. If the slave does not respond with an ACK for any rea-
son, a stop condition is generated by the master to
terminate the transfer or a restart condition may be gener-
ated for a retry attempt.
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 ...