![](http://datasheet.mmic.net.cn/Renesas-Electronics-America/UPD78F1168AGF-GAS-AX_datasheet_99857/UPD78F1168AGF-GAS-AX_559.png)
CHAPTER 14 SERIAL INTERFACE IIC0
User’s Manual U17894EJ9V0UD
557
14.5.8 Canceling wait
The I
2C usually cancels a wait state by the following processing.
Writing data to IIC shift register 0 (IIC0)
Setting bit 5 (WREL0) of IIC control register 0 (IICC0) (canceling wait)
Setting bit 1 (STT0) of IIC0 register (generating start condition)Note
Setting bit 0 (SPT0) of IIC0 register (generating stop condition)Note
Note
Master only
When the above wait canceling processing is executed, the I
2C cancels the wait state and communication is
resumed.
To cancel a wait state and transmit data (including addresses), write the data to IIC0.
To receive data after canceling a wait state, or to complete data transmission, set bit 5 (WREL0) of the IIC0 control
register 0 (IICC0) to 1.
To generate a restart condition after canceling a wait state, set bit 1 (STT0) of IICC0 to 1.
To generate a stop condition after canceling a wait state, set bit 0 (SPT0) of IICC0 to 1.
Execute the canceling processing only once for one wait state.
If, for example, data is written to IIC0 after canceling a wait state by setting WREL0 to 1, an incorrect value may be
output to SDA0 because the timing for changing the SDA0 line conflicts with the timing for writing IIC0.
In addition to the above, communication is stopped if IICE0 is cleared to 0 when communication has been aborted,
so that the wait state can be canceled.
If the I
2C bus has deadlocked due to noise, processing is saved from communication by setting bit 6 (LREL0) of
IICC0, so that the wait state can be canceled.