Hitachi H8/3637 Hardware Manual page 263

H8/3637 series
Table of Contents

Advertisement

Simultaneous Transmit/Receive: Figure 10.18 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.18 Simultaneous Transmit/Receive Flow Chart in Synchronous Mode
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, check that it is set to 1, and write
the next data in TDR before the MSB (bit 7)
of the current frame has been 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.16 for overrun error processing.
Note: When switching from transmit or receive
operation to simultaneous transmit/
receive operations, first clear the TE
bit and RE bit to 0, then set both these
bits to 1 simultaneously.
259

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8/3635H8/3636

Table of Contents