CHAPTER 17 SERIAL INTERFACE IIC0
Preliminary User’s Manual U17260EJ3V1UD
445
Figure 17-24. Master Operation Flowchart (Multi-Master System) (3/3)
Writing IIC0
WTIM0 = 1
WREL0 = 1
Reading IIC0
ACKE0 = 1
WTIM0 = 0
WTIM0 = WREL0 = 1
ACKE0 = 0
Writing IIC0
Yes
TRC0 = 1?
Restart?
MSTS0 = 1?
Starts communication
(specifies an address and transfer direction).
Starts transmission.
No
Yes
Waits for data reception.
Starts reception.
Yes
No
INTIIC0
i
nterrupt occurs?
Yes
No
Transfer end?
Waits for detection of ACK.
Yes
No
INTIIC0
i
nterrupt occurs?
Waits for data transmission.
Does not participate
in communication.
Yes
No
INTIIC0
i
nterrupt occurs?
No
Yes
ACKD0 = 1?
No
Yes
No
C
2
Yes
MSTS0 = 1?
No
Yes
Transfer end?
No
Yes
ACKD0 = 1?
No
2
Yes
MSTS0 = 1?
No
2
Waits for detection of ACK.
Yes
No
INTIIC0
i
nterrupt occurs?
Yes
MSTS0 = 1?
No
C
2
Yes
EXC0 = 1 or COI0 = 1?
No
1
2
SPT0 = 1
STT0 = 1
Slave operation
END
Communication processing
Communication processing
Remarks 1.
Conform to the specifications of the product that is communicating, with respect to the transmission
and reception formats.
2.
To use the device as a master in a multi-master system, read the MSTS0 bit each time interrupt
INTIIC0 has occurred to check the arbitration result.
3.
To use the device as a slave in a multi-master system, check the status by using the IICS0 and IICF0
registers each time interrupt INTIIC0 has occurred, and determine the processing to be performed
next.