Renesas rl78 User Manual

Page of 1004
 
RL78/G1A 
 
CHAPTER  12   SERIAL  ARRAY  UNIT 
R01UH0305EJ0200  Rev.2.00 
 
 
492  
Jul 04, 2013 
Figure 12-67.  Flowchart of Slave Transmission/Reception (in Single-Transmission/Reception Mode) 
 
 
Starting CSI communication
Write 1 to STmn bit 
Transmission/reception 
next data? 
Yes 
No 
End of communication 
Reading receive data 
from SIOp (=SDRmn[7:0])
Transmission/reception 
completed? 
No 
Yes 
Writing transmit data to 
SIOp (=SDRmn[7:0]) 
Start communication when master start providing the 
clock
 
When transfer end interrupt is generated, it moves to 
interrupt processing routine
 
Wait for transmission/reception 
completes
 
For the initial setting, see Figure 12-64
(Select Transfer end interrupt)
 
SAU default setting
 
Setting 
transmission/reception data
Setting storage area and number of data for transmission/reception data 
(Storage area, Transmission/reception data pointer, Number of communication data 
and Communication end flag are optionally set on the internal RAM by the software) 
RETI 
Transfer end interrupt
 
Enables interrupt 
Clear interrupt request flag (XXIF), reset interrupt mask (XXMK) and set 
interrupt enable (EI).
 
Disable interrupt (MASK)
Read receive data and write it to storage area.    Update 
receive data pointer.
 
Update the number of communication data and confirm 
if next transmission/reception data is available 
 
Read transmit data from storage area and write it to SIOp. 
Update transmit data pointer. 
M
a
in
 ro
u
tin
e
M
a
in
 ro
u
tin
e
Inter
rup
t pr
o
c
e
s
s
ing
routine
 
 
Caution  Be sure to set transmit data to the SlOp register before the clock from the master is started. 
 
Remark  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>