Communication Operations - NEC 78K0 Series User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0 Series:
Table of Contents

Advertisement

17.5.16 Communication operations

(1) Master operation (single-master system)
Figure 17-23. Master Operation Flowchart (Single-Master System)
ACKE0 = WTIM0 = SPIE0 = 1
No
No
Note Release (SCL0 and SDA0 pins = high level) the I
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.
442
CHAPTER 17 SERIAL INTERFACE IIC0
START
2
Note
Initializing I
C bus
Setting port
Sets each pin in the I
IICX0 ← 0XH
Selects a transfer clock.
IICCL0 ← XXH
SVA0 ← XXH
Sets a local address.
IICF0 ← 0XH
Sets a start condition.
Setting STCEN, IICRSV = 0
IICC0 ← XXH
IICE0 = 1
No
STCEN = 1?
Yes
Prepares for starting communication
STT0 = 1
(generates a start condition).
Starts communication
Writing IIC0
(specifies an address and transfer
direction).
INTIIC0
No
interrupt occurs?
Waits for detection of acknowledge.
Yes
ACKD0 = 1?
Yes
No
TRC0 = 1?
Yes
Writing IIC0
Starts transmission.
INTIIC0
No
interrupt occurs?
Waits for data transmission.
Yes
No
ACKD0 = 1?
Yes
End of transfer?
Yes
No
Restart?
SPT0 = 1
Yes
END
Preliminary User's Manual U17260EJ3V1UD
2
C mode (see 17.3 (7) Port mode register 6 (PM6)).
SPT0 = 1
INTIIC0
Interrupt occurs?
Yes
ACKE0 = 1
WTIM0 = 0
WREL0 = 1
INTIIC0
interrupt occurs?
Yes
Reading IIC0
End of transfer?
Yes
ACKE0 = 0
WTIM0 = WREL0 = 1
INTIIC0
interrupt occurs?
Yes
2
C bus in conformance with the specifications of the
Prepares for starting
communication
(generates a stop condition).
No
Waits for detection of
the stop condition.
Starts reception.
No
Waits for data
reception.
No
No
Waits for detection
of acknowledge.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents