296
Document # 001-20559 Rev. *D
I2C
Figure 28-1. Basic I
2
C Data Transfer with 7-Bit Address Format
28.2
Application Description
28.2.1
Slave Operation
Assuming Slave mode is enabled, it is continually listening
to or on the bus for a start condition. When detected, the
transmitted Address/RW byte is received and read from the
I2C block by firmware. At the point where eight bits of the
address/RW byte are received, a byte complete interrupt is
generated. On the following low of the clock, the bus is
stalled by holding the SCL line low, until the PSoC device
has a chance to read the address byte and compare it to its
own address. It issues an ACK or NACK command based
on that comparison.
If there is an address match, the RW bit determines how the
PSoC device sequences the data transfer in Slave mode, as
shown in the two branches of
. I2C handshaking
methodology (slave holds the SCL line low to “stall” the bus)
is used as necessary, to give the PSoC device time to
respond to the events and conditions on the bus.
is a graphical representation of a typical data
transfer from the slave perspective.
Figure 28-2. Slave Operation
1
7
8
9
1
7
8
9
START
7-Bit Address
R/W
ACK
8-Bit Data
ACK/
NACK
STOP
1
7
8
1
7
8
9
START
7-Bit Address
R/W
ACK
8-Bit Data
ACK/
NACK
STOP
SHIFTER
M8C reads the
received byte from the
I2C_DR register and
checks for “Own
Address” and R/W.
1
7
8
8-Bit Data
STOP
SHIFTER
M8C writes the
byte to transmit
to the I2C_DR
register.
9
SHIFTER
R
ead
(T
X
)
W
rit
e
(R
X
)
M8C writes
(ACK) to
I2C_SCR
register.
Slave Transmitter/Reciever
ACK/
NACK
M8C issues ACK/
NACK command
with a write to the
I2C_SCR register.
Master may
transmit
another byte
or STOP.
M8C reads the
received byte from
the I2C_DR register.
ACK = Master
wants to read
another byte.
NACK = Master
says end-of-data
NACK =
Slave says no
more
ACK = OK to
receive more
A byte interrupt is
generated. The SCL line
is held low.
An interrupt is generated
on byte complete. The
SCL line is held low.
An interrupt is generated
on a complete byte +
ACK/NACK. The SCL line
is held low.
ACK
M8C writes
(ACK | TRANSMIT) to
I2C_SCR register.
9
M8C writes a new byte to the
I2C_DR register and then writes
a TRANSMIT command to
I2C_SCR to release the bus.
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 ...