
CHAPTER 16 SERIAL INTERFACE IICA
User’s Manual U19780EJ2V0UD
466
(1) Master operation in single-master system
Figure 16-28. Master Operation in Single-Master System
SPT0 = 1
SPT0 = 1
WREL0 = 1
START
END
ACKE0 = 0
WTIM0 = WREL0 = 1
No
No
Yes
No
No
No
Yes
Yes
Yes
Yes
STCEN = 1?
ACKE0 = 1
WTIM0 = 0
TRC0 = 1?
ACKD0 = 1?
ACKD0 = 1?
No
Yes
No
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
STT0 = 1
IICWL, IICWH
←
XXH
IICAF0
←
0XH
Setting STCEN, IICRSV = 0
IICACTL0
←
1XX111XXB
IICE0 = 1
IICACTL0
←
0XX111XXB
ACKE0 = WTIM0 = SPIE0 = 1
Setting port
Initializing I
2
C bus
Note
SVA0
←
XXH
Writing IICA
Writing IICA
Reading IICA
INTIICA0
interrupt occurs?
End of transfer?
End of transfer?
Restart?
Setting of the port used alternatively as the pin to be used.
First, set the port to input mode and the output latch to 0 (see
16.3 (7) Port mode register 6 (PM6)
).
Setting port
Set the port from input mode to output mode and enable the output of the I
2
C bus
(see
16.3 (7) Port mode register 6 (PM6)
).
Sets a transfer clock.
Sets a local address.
Sets a start condition.
Prepares for starting communication
(generates a start condition).
Starts communication
(specifies an address and transfer
direction).
Waits for detection of acknowledge.
Waits for data transmission.
Starts transmission.
Communication processing
Initial setting
Starts reception.
Waits for data
reception.
INTIICA0
interrupt occurs?
Waits for detection
of acknowledge.
Prepares for starting communication
(generates a stop condition).
Waits for detection of the stop condition.
INTIICA0
interrupt occurs?
INTIICA0
interrupt occurs?
INTIICA0
interrupt occurs?
Note
Release (SCLA0 and SDAA0 pins = high level) the I
2
C bus in conformance with the specifications of the
product that is communicating. If EEPROM is outputting a low level to the SDAA0 pin, for example, set the
SCLA0 pin in the output port mode, and output a clock pulse from the output port until the SDAA0 pin is
constantly at high level.
Remark
Conform to the specifications of the product that is communicating, with respect to the transmission and
reception formats.