302
Document # 001-20559 Rev. *D
I2C
Slave Transmitter:
‘0’: ACK.
The master wants to read another byte. The
slave loads the next byte into the I2C_DR register and
sets the transmit bit in the I2C_SCR register to continue
the transfer.
‘1’: NACK.
The master is done reading bytes. The slave
reverts to IDLE state on the subsequent I2C_SCR write
(regardless of the value written).
Bit 0: Byte Complete.
The I2C 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 interrupt 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 approx-
imately one-half bit time), the transfer continues without
interruption. However, if the PSoC device is unable to
respond within that time, the hardware holds the SCL line
low, stalling the I2C bus. In both Master and Slave mode, a
subsequent write to the I2C_SCR register releases the stall.
For additional information, refer to the
28.3.3
I2C_DR Register
The I2C 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 only occur at specific
points in the transfer. These cases are outlined as follows.
■
Master or Slave Receiver
– Data in the I2C_DR regis-
ter is only valid for reading, when the Byte Complete sta-
tus 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 writ-
ten 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.4
I2C_MSCR Register
The I2C Master Status and Control Register (I2C_MSCR)
implements I2C 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 is polled by
firmware to determine when a bus transfer is 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.
Bit 1: Restart Gen.
This bit is only used at the end of a
master transfer (as noted in Other Cases 1 and 2 of the Start
Gen bit). If an address is loaded into the data register and
this bit is set prior to NACKing (master receiver) or resetting
the transmit bit (master transmitter), or after a master trans-
mitter is NACK’ed by the slave, a restart condition is gener-
ated followed by the transmission of the address byte.
Bit 0: Start Gen.
Before setting this bit, firmware must write
the address byte to send into the I2C_DR register. When
this bit is set, the start condition is generated followed imme-
diately by the transmission of the address byte. (No control
in the I2C_SCR register is needed for the master to initiate a
transmission; the direction is inherently “transmit.”) The bit is
automatically reset to ‘0’ after the start has been generated.
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,D8h
Data[7:0]
RW : 00
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,D9h
Bus Busy
Master
Mode
Restart Gen
Start Gen
R : 00
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 ...