502
CY8C28xxx PSoC Programmable System-on-Chip TRM, Document No. 001-52594 Rev. *G
I
2
C
firmware has set the Start or Restart bits in the
I2C_MSCR register.
Slave Transmitter:
‘0’: ACK.
The master wants to read another byte. The
slave should load the next byte into the I2C_DR register
and set the transmit bit in the I2C_SCR register to con-
tinue the transfer.
‘1’: NAK.
The master is done reading bytes. The slave
will revert to IDLE state on the subsequent I2C_SCR
write (regardless of the value written).
Bit 0: Byte Complete.
The I
2
C hardware operates on a
byte basis. In Transmit mode, this bit is set and an interrupt
is generated at the end of nine bits (the transmitted byte +
the received ACK). In Receive mode, the bit is set after the
eight bits of data are received. When this bit is set, an inter-
rupt is generated at these data sampling points, which are
associated with the SCL input clock rising (see details in the
Timing section). If the PSoC device responds with a write
back to this register before the subsequent falling edge of
SCL (which is approximately one-half bit time), the transfer
will continue without interruption. However, if the PSoC
device is unable to respond within that time, the hardware
will hold the SCL line low, stalling the I
2
C bus. In both Master
and Slave mode, a subsequent write to the I2C_SCR regis-
ter will release the stall.
For additional information, refer to the
.
28.3.4
I2Cx_DR Register
The I
2
C Data Register (I2C_DR) provides read/write access
to the Shift register.
Bits 7 to 0: Data[7:0].
This register is not buffered; and
therefore, writes and valid data reads may only occur at spe-
cific points in the transfer. These cases are outlined as fol-
lows.
■
Master or Slave Receiver
– Data in the I2C_DR register
is only valid for reading, when the Byte Complete status
bit is set. Data bytes must be read from the register
before writing to the I2C_SCR register, which continues
the transfer.
■
Master Start or Restart
– Address bytes must be written
in I2C_DR before the Start or Restart bit is set in the
I2C_MSCR register, which causes the Start or Restart to
generate and the address to shift out.
■
Master or Slave Transmitter
– Data bytes must be writ-
ten to the I2C_DR register before the transmit bit is set in
the I2C_SCR register, which causes the transfer to con-
tinue.
For additional information, refer to the
.
28.3.5
I2Cx_MSCR Register
The I
2
C Master Status and Control Register (I2C_MSCR)
implements I
2
C framing controls and provides Bus Busy sta-
tus.
Bit 3: Bus Busy.
This read only bit is set to ‘1’ by any Start
condition and reset to ‘0’ by a Stop condition. It may be
polled by firmware to determine when a bus transfer may be
initiated.
Bit 2: Master Mode.
This bit indicates that the device is
operating as a master. It is set in the detection of this block’s
Start condition and reset in the detection of the subsequent
Stop condition.
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,xxh
Data[7:0]
RW : 00
LEGEND
Xx An “x” in the address field indicates that there are multiple instances of the register. For an expanded address listing of these registers,
refer to the
“System Resources Register Summary” on page 462
Note
2nd I
2
C block in CY8C28x03, CY8C28x23, CY8C28x43, and CY8C28x45 devices only.
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,xxh
Bus Busy
Master
Mode
Restart Gen
Start Gen
R : 00
LEGEND
Xx An “x” in the address field indicates that there are multiple instances of the register. For an expanded address listing of these registers,
refer to the
“System Resources Register Summary” on page 462
Note
2nd I
2
C block in CY8C28x03, CY8C28x23, CY8C28x43, and CY8C28x45 devices only.
Summary of Contents for CY8C28 series
Page 65: ...64 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G RAM Paging ...
Page 125: ...124 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 311: ...310 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G IDAC_CR0 1 FDh ...
Page 317: ...316 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 393: ...392 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 477: ...476 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Digital Clocks ...
Page 561: ...560 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...