Renesas rl78 Answering Machine User Manual


  Open as PDF
of 1004
 
RL78/G1A CHAPTER 12 SERIAL ARRAY UNIT
R01UH0305EJ0200 Rev.2.00 466
Jul 04, 2013
Figure 12-47. Flowchart of Master Transmission/Reception (in Continuous Transmission/Reception Mode)
Setting
transmission/reception data
Reading reception data from
SIOp (=SDRmn[7:0])
Write 1 to STmn bit
For the initial setting, see Figure 12-42.
(Select buffer empty interrupt)
SAU default setting
N
o
N
o
End of communication
Y
es
Yes
No
Continuing Communication?
Y
es
Number of
communication data?
Write 1 to MDmn0 bit
BFFmn = 1?
<2>
<3>
<5>
<6>
<7>
<4>
<8>
<1>
Subtract -1 from number of
transmit data
Setting storage data and number of data for transmission/reception data
(Storage area, Transmission data pointer, Reception data, Number of
communication data and Communication end flag are optionally set on the
internal RAM by the software)
Clear MDmn0 bit to 0
Writing dummy data to
SIOp (=SDRmn[7:0])
Writing transmit data to
SIOp (=SDRmn[7:0])
Except for initial interrupt, read data received then write them
to storage area, and update receive data pointer
If transmit data is left (number of communication data is
equal or grater than 2), read them from storage area then
write into SIOp, and update transmit data pointer.
If it’s waiting for the last data to receive (number of
communication data is equal to 1), change interrupt timing
to communication end
RETI
Number of communication
data
= 0?
Starting setting
When transmission/reception interrupt is generated, i
t
moves to interrupt processing routine
Buffer empty/transfer end interrupt
Wait for transmission/reception
completes
2
= 0
= 1
Enables interrupt
Clear interrupt request flag (XXIF), reset interrupt mask (XXMK) and set interrupt
enable (EI)
Disable interrupt (MASK)
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 routine Interrupt processing routine
Remarks 1. <1> to <8> in the figure correspond to <1> to <8> in Figure 12-46 Timing Chart of Master
Transmission/Reception (in Continuous Transmission/Reception 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>