CHAPTER 17 SERIAL INTERFACE IIC0
Preliminary User’s Manual U17260EJ3V1UD
442
17.5.16 Communication operations
(1) Master operation (single-master system)
Figure 17-23. Master Operation Flowchart (Single-Master System)
IICX0
←
0XH
IICCL0
←
XXH
IICF0
←
0XH
Setting STCEN, IICRSV = 0
IICC0
←
XXH
ACKE0 = WTIM0 = SPIE0 = 1
IICE0 = 1
Setting port
Initializing I
2
C bus
Note
SPT0 = 1
SVA0
←
XXH
Writing IIC0
Writing IIC0
SPT0 = 1
WREL0 = 1
START
END
Reading IIC0
ACKE0 = 0
WTIM0 = WREL0 = 1
No
No
Yes
No
No
No
Yes
Yes
Yes
Yes
STCEN = 1?
ACKE0 = 1
WTIM0 = 0
INTIIC0
interrupt occurs?
End of transfer?
End of transfer?
Restart?
TRC0 = 1?
ACKD0 = 1?
ACKD0 = 1?
Sets each pin in the I
2
C mode (see
17.3 (7) Port mode register 6 (PM6)
).
Selects 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.
No
Yes
INTIIC0
interrupt occurs?
Waits for detection
of acknowledge.
Prepares for starting
communication
(generates a stop condition).
Waits for detection of
the stop condition.
No
Yes
Yes
No
INTIIC0
Interrupt occurs?
Yes
No
INTIIC0
interrupt occurs?
Yes
No
Yes
No
Yes
No
INTIIC0
interrupt occurs?
STT0 = 1
Note
Release (SCL0 and SDA0 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 SDA0 pin, for example, set the
SCL0 pin in the output port mode, and output a clock pulse from the output port until the SDA0 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.
Содержание 78K/0 Series
Страница 2: ...Preliminary User s Manual U17260EJ3V1UD 2 MEMO ...
Страница 10: ......
Страница 53: ...CHAPTER 3 CPU ARCHITECTURE Preliminary User s Manual U17260EJ3V1UD 53 Figure 3 6 Memory Map µPD78F0536 ...
Страница 120: ......