RL78/G1P
CHAPTER 11 SERIAL ARRAY UNIT
R01UH0895EJ0100 Rev.1.00
349
Nov 29, 2019
Figure 11-31. Flowchart of Master Transmission (in Continuous Transmission Mode)
SAU default setting
Starting setting
Wait for transmit completes
Yes
No
Setting transmit data
Enables interrupt
No
Yes
End of communication
RETI
No
Yes
No
Yes
M
a
in
ro
u
tin
e
Int
er
rupt
pr
oc
e
s
s
ing r
out
ine
Ma
in
ro
u
tin
e
MDmn0 = 1?
If transmit data is left, read them from storage
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.
Number of
communication data > 0?
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).
<1>
<2>
<3><5>
<4>
Read transmit data from storage area and write it
to SIOp. Update transmit data pointer.
Writing to SIOp makes SOp
and SCKp signals out
(communication starts)
When transfer end interrupt is generated, it
moves to interrupt processing routine.
Buffer empty/transfer end interrupt
Writing transmit data to
SIOp (= SDRmn [7:0])
Writing transmit data to
SIOp (= SDRmn [7:0])
Subtract -1 from number of
transmit data
Transmission completed?
Write MDmn0 bit to 1
Communication
continued?
Disable interrupt (MASK)
Write STmn bit to 1
<6>
Check completion of transmission by
verifying transmit end flag
Clear MDmn0 bit to 0
Sets communication
completion interrupt flag
Remark
<1> to <6> in the figure correspond to <1> to <6> in
Figure 11-30 Timing Chart of Master
Transmission (in Continuous Transmission Mode)
.