Renesas F-ZTAT H8 Series Hardware Manual page 324

8-bit single-chip microcomputer
Hide thumbs Also See for F-ZTAT H8 Series:
Table of Contents

Advertisement

10. Serial Communication Interface
Simultaneous Transmit/Receive: Figure 10.19 shows a typical flow chart for transmitting and
receiving simultaneously. After SCI3 synchronization, follow the procedure below.
Start
1
Read bit TDRE in SSR
TDRE = 1?
Yes
2
Write transmit data in TDR
Read bit OER in SSR
OER = 1?
No
Read RDRF in SSR
RDRF = 1?
Yes
Read received data in RDR
Continue
transmitting and
3
receiving?
No
Clear bits TE and
RE in SCR3 to 0
End
Figure 10.19 Simultaneous Transmit/Receive Flow Chart in Synchronous Mode
Rev.3.00 Jul. 19, 2007 page 298 of 532
REJ09B0397-0300
No
Yes
No
4
Overrun error processing
Yes
1.
Read the serial status register (SSR),
and after confirming that bit TDRE = 1,
write transmit data in the transmit data
register (TDR). When data is written to
TDR, TDRE is automatically cleared to 0.
2.
Read the serial status register (SSR),
and after confirming that bit RDRF = 1,
read the received data from the receive
data register (RDR). When data is read
from RDR, RDRF is automatically cleared
to 0.
3.
To continue transmitting and receiving
serial data, read bit RDRF and finish
reading RDR before the MSB (bit 7) of the
present frame is received. Also read bit
TDRE and check that it is set to 1, indicating
that data can be written, then write the next
data in TDR, before the MSB (bit 7) of the
current frame is transmitted. When data is
written to TDR, TDRE is automatically cleared
to 0; and when data is read from RDR, RDRF
is automatically cleared to 0.
4.
When an overrun error occurs, read bit
OER in SSR. After the necessary error
processing, be sure to clear OER to 0.
Data transmission and reception cannot
take place while bit OER is set to 1. See
figure 10.17 for overrun error processing.

Advertisement

Table of Contents
loading

Table of Contents