494
CY8C28xxx PSoC Programmable System-on-Chip TRM, Document No. 001-52594 Rev. *G
I
2
C
Figure 28-1. Block Diagram with Two I
2
C Blocks
28.1.2
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
C-bus™ Specification and User
Manual, version 03
.)
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 may proceed and the master can transmit or receive
an indeterminate number of bytes, depending on the RW
direction. If the slave does not respond with an ACK for any
reason, a Stop condition is generated by the master to termi-
nate the transfer or a Restart condition may be generated for
a retry attempt.
Figure 28-2. 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 compared by
either firmware or hardware:
1. In firmware address comparison mode, at the point
where eight bits of the address/RW byte are received, a
byte complete interrupt is generated. Following the 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 will
issue an ACK or NAK command based on that compari-
son.
2. In hardware address comparison mode, the received
address is automatically compared when the address/
RW byte is completed, and the hardware will automati-
cally issue an NAK if address mismatches. If address
matches, a byte complete interrupt is generated, which
is similar in the firmware comparison. Following the 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 to determine the R/W I
2
C operation (firm-
ware does not need to compare the address). Finally, the
firmware needs to issue an ACK to continue I
2
C opera-
tion.
If there is an address match, the RW bit determines how the
PSoC device will sequence the data transfer in Slave mode,
as shown in the two branches of
2
C handshak-
ing methodology (slave holds the SCL line low to “stall” the
bus) will be 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.
SDA
SCL
SDA
SCL
CPU
PSoC
®
I
2
C 0
I
2
C 1
SysClk
1
7
8
9
1
7
8
9
START
7-Bit Address
R/W
ACK
8-Bit Data
ACK/
NACK
STOP
Содержание CY8C28 series
Страница 65: ...64 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G RAM Paging ...
Страница 85: ...84 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Internal Main Oscillator IMO ...
Страница 93: ...92 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G External Crystal Oscillator ECO ...
Страница 97: ...96 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Phase Locked Loop PLL ...
Страница 125: ...124 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Страница 311: ...310 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G IDAC_CR0 1 FDh ...
Страница 317: ...316 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Страница 393: ...392 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Страница 425: ...424 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Analog Reference ...
Страница 461: ...460 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Two Column Limited Analog System ...
Страница 477: ...476 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Digital Clocks ...
Страница 483: ...482 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Multiply Accumulate MAC ...
Страница 513: ...512 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Internal Voltage Reference ...
Страница 523: ...522 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Switch Mode Pump SMP ...
Страница 533: ...532 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G I O Analog Multiplexer ...
Страница 537: ...536 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Real Time Clock RTC ...
Страница 561: ...560 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...