Renesas RL78 Series User Manual page 588

16-bit single-chip microcontrollers
Hide thumbs Also See for RL78 Series:
Table of Contents

Advertisement

RL78/G1D
(3) Slave operation
The processing procedure of the slave operation is as follows.
Basically, the slave operation is event-driven. Therefore, processing by the INTIICAn interrupt (processing that must
substantially change the operation status such as detection of a stop condition during communication) is necessary.
In the following explanation, it is assumed that the extension code is not supported for data communication. It is also
assumed that the INTIICAn interrupt servicing only performs status transition processing, and that actual data
communication is performed by the main processing.
IICA
Therefore, data communication processing is performed by preparing the following three flags and passing them to
the main processing instead of INTIICAn.
<1> Communication mode flag
This flag indicates the following two communication statuses.
● Clear mode:
● Communication mode: Status in which data communication is performed (from valid address detection to
<2> Ready flag
This flag indicates that data communication is enabled. Its function is the same as the INTIICAn interrupt for
ordinary data communication. This flag is set by interrupt servicing and cleared by the main processing.
Clear this flag by interrupt servicing when communication is started. However, the ready flag is not set by
interrupt servicing when the first data is transmitted. Therefore, the first data is transmitted without the flag
being cleared (an address match is interpreted as a request for the next data).
<3> Communication direction flag
This flag indicates the direction of communication. Its value is the same as the TRCn bit.
Remark n = 0
R01UH0515EJ0120 Rev.1.20
Dec 16, 2016
INTIICAn
Interrupt servicing
Setting
Data
Setting
Status in which data communication is not performed
stop condition detection, no detection of ACK from master, address mismatch)
CHAPTER 14 SERIAL INTERFACE IICA
Flag
Main processing
567

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rl78/g1dR5f11aggR5f11aghR5f11agj

Table of Contents