EasyManuals Logo

Renesas RL78/G1D User Manual

Renesas RL78/G1D
1092 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #766 background imageLoading...
Page #766 background image
RL78/G13 CHAPTER 13 SERIAL INTERFACE IICA
R01UH0146EJ0100 Rev.1.00 747
Sep 22, 2011
The main processing of the slave operation is explained next.
Start serial interface IICA and wait until communication is enabled. When communication is enabled, execute
communication by using the communication mode flag and ready flag (processing of the stop condition and start
condition is performed by an interrupt. Here, check the status by using the flags).
The transmission operation is repeated until the master no longer returns ACK. If ACK is not returned from the
master, communication is completed.
For reception, the necessary amount of data is received. When communication is completed, ACK is not returned
as the next data. After that, the master generates a stop condition or restart condition. Exit from the
communication status occurs in this way.
Figure 13-30. Slave Operation Flowchart (1)
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
No
WREL0 = 1
ACKD0 = 1?
No
Yes
No
Yes
No
START
Communication
mode flag = 1?
Communication
mode flag = 1?
Communication
direction flag = 1?
Ready flag = 1?
Communication
direction flag = 1?
Reading IICA0
Clearing ready flag
Clearing ready flag
Communication
direction flag = 1?
Clearing communication
mode flag
WREL0 = 1
Writing IICA0
SVA0 XXH
Sets a local address.
IICWL0, IICWH0 XXH
Selects a transfer clock.
IICF0 0XH
Setting IICRSV0
Sets a start condition.
Starts
transmission.
Starts
reception.
Communication
mode flag = 1?
Ready flag = 1?
Setting port
Setting port
Communication processing
Initial setting
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 13.3 (8) Port mode register 6 (PM6)).
Set the port from input mode to output mode and enable the output of the I
2
C bus
(see 13.3 (8) Port mode register 6 (PM6)).
IICCTL00 0XX011XXB
ACKE0 = WTIM0 = 1, SPI0 = 0
IICCTL00 1XX011XXB
IICE0 = 1
Remark Conform to the specifications of the product that is in communication, regarding the transmission and
reception formats.

Table of Contents

Other manuals for Renesas RL78/G1D

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Renesas RL78/G1D and is the answer not in the manual?

Renesas RL78/G1D Specifications

General IconGeneral
BrandRenesas
ModelRL78/G1D
CategoryComputer Hardware
LanguageEnglish

Related product manuals