Renesas H8 Series Hardware Manual page 417

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

Advertisement

• Simultaneous transmit/receive
Figure 10.15 shows an example of a flowchart for a simultaneous transmit/receive operation. This
procedure should be followed for simultaneous transmission/reception after initializing SCI3.
Sets bit SPC32 to
Read bit TDRE
TDRE = 1?
Write transmit
data to TDR
Read bit OER
Read bit RDRF
RDRF = 1?
Read receive data
Continue data
transmission/reception?
Clear bits TE and
RE to 0 in SCR3
Figure 10.15 Example of Simultaneous Data Transmission/Reception Flowchart
Start
1 in SPCR
[1]
in SSR
No
Yes
in SSR
Yes
OER = 1?
No
[2]
in SSR
No
Yes
in RDR
Overrun error
processing
[3]
Yes
No
End
(Synchronous Mode)
Section 10 Serial Communication Interface
[1]
Read the serial status register (SSR) and
check that bit TDRE is set to 1, then write
transmit data to the transmit data register
(TDR). When data is written to TDR, bit
TDRE is cleared to 0 automatically.
[2]
Read SSR and check that bit RDRF is set
to 1. If it is, read the receive data in RDR.
When the RDR data is read, bit RDRF is
cleared to 0 automatically.
[3]
When continuing data transmission/reception,
finish reading of bit RDRF and RDR before
receiving the MSB (bit 7) of the current frame.
Before receiving the MSB (bit 7) of the current
frame, also read TDRE = 1 to confirm that a
write can be performed, then write data to TDR.
When data is written to TDR, bit TDRE is cleared
to 0 automatically, and when the data in RDR is
read, bit RDRF is cleared to 0 automatically.
[4]
If an overrun error has occurred, read bit OER
in SSR, and after carrying out the necessary
error processing, clear bit OER to 0. Transmis-
sion and reception cannot be resumed if bit
OER is set to 1.
See figure 10.13 for details on overrun error
processing.
[4]
Rev. 7.00 Mar 10, 2005 page 375 of 652
REJ09B0042-0700

Advertisement

Table of Contents
loading

Table of Contents