![](http://datasheet.mmic.net.cn/370000/UPD780076_datasheet_16740795/UPD780076_366.png)
366
CHAPTER 18 SERIAL INTERFACE IIC0 (
μ
PD780078Y SUBSERIES ONLY)
User’s Manual U14260EJ3V1UD
Figure 18-21. Master Operation Flowchart (5/5)
Remark
While the slave is outputting a low level to the data line, the master cannot issue the stop condition. This
happens if EEPROM is not reset, even though the microcontroller is reset, because of supply voltage
fluctuation during communication (reading from EEPROM). In this case, the EEPROM continues
sending data, and may output a low level to the data line. Because the structure of I
2
C does not allow
the master to forcibly make the data line high, the master cannot issue the stop condition.
To avoid this phenomenon, it is possible to use a clock line as a port, output a dummy clock from the
port, continue reading data from EEPROM by inputting the dummy clock, and complete reading with
some EEPROMs (because the data line goes high when reading is completed, the master can issue
the stop condition. After that, the status of EEPROM can be controlled). At this time, the port
corresponding to the data line must always be in the high-impedance state (high-level output).
Re-set IIC control register 0.
ACKE0 = 1, WTIM0 = 0
Issue stop condition.
SPT0 = 1
Re-set IIC control register 0.
ACKE0 = 0, WREL0 = WTIM0 = 1
SPD0 = 1
D
END
No
Remaining data
Yes
Start data reception.
IIC0
←
0FFH
INTIIC0 = 1
No
No
Set so that ACK is automatically returned
after an 8-clock wait (set ACKE0 so that
ACK is returned except when the last data
is received. Specify an 8-clock wait so that
automatic returning of ACK can be cleared
when the last data is received).
Write dummy data to IIC0 and start
reception (reception can also be started
when WREL0 = 1).
Reception is completed when INTIIC0
occurs.
Save the received data to a buffer.
When reception of data is completed,
disable automatic returning of ACK, set a 9-
clock wait, cancel wait in the ACK cycle,
and stop at the 9th clock. As a result, ACK
is not returned to the slave. This indicates
the completion of reception. Issue the stop
condition and end communication.
Save receive data.
Clear INTIIC0.
Yes
Yes
INTIIC0 = 1
No
Yes