Figure 14.15 Sample Flowchart Of Simultaneous Serial Transmit And Receive Operations (Clocked Synchronous Mode) - Renesas H8/36912 Series User Manual

16-bit single-chip microcomputer
Hide thumbs Also See for H8/36912 Series:
Table of Contents

Advertisement

No
No
Yes
Clear TE and RE bits in SCR to 0
Figure 14.15 Sample Flowchart of Simultaneous Serial Transmit and Receive Operations
Rev. 1.00, 11/03, page 214 of 376
Downloaded from
Elcodis.com
electronic components distributor
Start transmission/reception
Read TDRE flag in SSR
TDRE = 1
Yes
Write transmit data to TDR
Read OER flag in SSR
OER = 1
No
Read RDRF flag in SSR
RDRF = 1
Yes
Read receive data in RDR
All data received?
No
<End>
(Clocked Synchronous Mode)
[1]
Read SSR and check that the TDRE
flag is set to 1, then write transmit
data to TDR.
When data is written to TDR, the
TDRE flag is automatically cleared to
[1]
0.
[2]
Read SSR and check that the RDRF
flag is set to 1, then read the receive
data in RDR.
When data is read from RDR, the
RDRF flag is automatically cleared to
0.
[3]
To continue serial transmission/
reception, before the MSB (bit 7) of
the current frame is received, finish
reading the RDRF flag, reading RDR.
Also, before the MSB (bit 7) of the
current frame is transmitted, read 1
from the TDRE flag to confirm that
writing is possible. Then write data to
Yes
TDR.
When data is written to TDR, the
TDRE flag is automatically cleared to
0. When data is read from RDR, the
RDRF flag is automatically cleared to
[2]
0.
[4]
If an overrun error occurs, read the
OER flag in SSR, and after
[4]
performing the appropriate error
processing, clear the OER flag to 0.
Overrun error
Transmission/reception cannot be
processing
resumed if the OER flag is set to 1.
For overrun error processing, see
figure 14.14.
[3]

Advertisement

Table of Contents
loading

Table of Contents