Renesas rl78 Answering Machine User Manual


  Open as PDF
of 1004
 
RL78/G1A CHAPTER 12 SERIAL ARRAY UNIT
R01UH0305EJ0200 Rev.2.00 446
Jul 04, 2013
Figure 12-31. Flowchart of Master Transmission (in Continuous Transmission Mode)
Setting transmit data
Write 1 to STmn bit
For the initial setting, see Figure 12-26.
(Select buffer empty interrupt)
SAU default setting
Y
es
No
N
o
End of communication
Y
es
N
o
Communication
continued?
Y
es
Number of
communication data > 0?
<2>
<3>
<4>
<5>
<6>
<1>
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 MDmn0 bit to 0
Writing transmit data to
SIOp (=SDRmn[7:0])
Writing transmit data to
SIOp (=SDRmn[7:0])
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 MDmn bit if it’s set. If not,
finish.
Subtract -1 from number of
transmit data
RETI
Transmission completed?
Starting setting
When transfer end interrupt is generated, it moves t
o
interrupt processing routine.
Buffer empty/transfer end interrupt
Write 1 to MDmn0 bit
Y
es
N
o
MDmn = 1?
Sets communication
completion interrupt flag
Wait for transmit completes
Clear interrupt request flag (XXIF), reset interrupt mask (XXMK) and set
interrupt enable (EI).
Enables interrupt
Disable interru
p
t
(
MASK
)
Check completion of transmission by
verifying transmit end flag
Writing to SIOp makes SOp
and SCKp signals out
(communication starts)
Read transmit data from storage area and write it
to SIOp. Update transmit data pointer.
Main routine Main routineInterrupt processing routine
Remarks 1. <1> to <6> in the figure correspond to <1> to <6> in Figure 12-30 Timing Chart of Master
Transmission (in Continuous Transmission Mode).
2. m: Unit number (m = 0, 1), n: Channel number (n = 0 to 3), p: CSI number (p = 00, 01, 10, 11, 20,
21), mn = 00 to 03, 10, 11
<R>
<R>