Renesas RL78/G1P Hardware User Manual page 368

16-bit single-chip microcontroller
Hide thumbs Also See for RL78/G1P:
Table of Contents

Advertisement

RL78/G1P
Figure 11-31. Flowchart of Master Transmission (in Continuous Transmission Mode)
<1>
<2>
<3><5>
No
Write MDmn0 bit to 1
Yes
<6>
Remark
<1> to <6> in the figure correspond to <1> to <6> in Figure 11-30
Transmission (in Continuous Transmission Mode).
R01UH0895EJ0100 Rev.1.00
Nov 29, 2019
Starting setting
SAU default setting
Setting transmit data
Enables interrupt
Writing transmit data to
SIOp (= SDRmn [7:0])
Wait for transmit completes
Buffer empty/transfer end interrupt
Number of
communication data > 0?
Yes
Writing transmit data to
SIOp (= SDRmn [7:0])
Subtract -1 from number of
transmit data
RETI
Transmission completed?
Yes
Communication
continued?
No
Disable interrupt (MASK)
Write STmn bit to 1
End of communication
CHAPTER 11 SERIAL ARRAY UNIT
For the initial setting, refer to Figure 11-25.
(Select buffer empty interrupt)
Set data for transmission and the number of data. Clear communication end flag
(Storage area, Transmission data pointer, Number of communication data and
Communication end flag are optionally set on the internal RAM by the software)
Clear interrupt request flag (XXIF), reset interrupt mask (XXMK) and set
interrupt enable (EI).
Read transmit data from storage area and write it
to SIOp. Update transmit data pointer.
When transfer end interrupt is generated, it
moves to interrupt processing routine.
If transmit data is left, read them from storage
No
area then write into SIOp, and update transmit
data pointer and number of transmit data.
If no more transmit data, clear MDmn0 bit if it's
set. If not, finish.
MDmn0 = 1?
Yes
Clear MDmn0 bit to 0
Check completion of transmission by
verifying transmit end flag
Writing to SIOp makes SOp
and SCKp signals out
(communication starts)
No
<4>
Sets communication
completion interrupt flag
Timing Chart of Master
349

Advertisement

Table of Contents
loading

Table of Contents