enCoRe™ V CY7C643xx, enCoRe™ V LV CY7C604xx TRM, Document No. 001-32519 Rev *H
105
I
2
C Slave
15.2
Application Overview
15.2.1
Slave Operation
When Slave mode is enabled, it is continually listening on
the bus for a Start condition. When detected, the transmitted
address/RW byte is received and read from the I
2
C 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 hold-
ing the SCL line low until the enCoRe V device has had a
chance to read the address byte and compare it to its own
address. It Issues an ACK or NACK command based upon
that comparison.
If there is an address match, the RW bit determines how the
enCoRe V device sequences the data transfer in Slave
mode, as shown in the two branches of
. I
2
C
handshaking methodology (slave holds the SCL line low to
“stall” the bus) is used, as necessary, to give the enCoRe V
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 15-4. Slave Operation
1
7
8
1
7
8
9
STAR
T
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
Re
ad
(TX
)
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.