Renesas Hitachi H8S/2194 Series Hardware Manual page 499

16-bit single-chip microcomputer
Table of Contents

Advertisement

(b) Serial Data Transmission (Asynchronous Mode)
Figure 23.5 shows a sample flowchart for serial transmission.
The following procedure should be used for serial data transmission.
Initialization
Start transmission
Read TDRE flag in SSR1
TDRE=1
Write transmit data to TDR1 and
clear TDRE flag in SSR1 to 0
All data transmitted?
Read TEND flag in SSR1
TEND=1
Break output?
Clear PDR to 0
and set PCR to 1
Clear TE bit in SCR1 to 0
< End >
Rev. 2.0, 11/00, page 472 of 1037
No
Yes
No
Yes
No
Yes
No
Yes
Figure 23.5 Sample Serial Transmission Flowchart
SCI1 initialization:
[1]
[1]
The SO1 pin is automatically designated as
the transmit data output pin.
SCI1 status check and transmit data write:
[2]
Read SSR1 and check that the TDRE flag
is set to 1, then write transmit data to TDR1
[1]
and clear the TDRE flag to 0.
Serial transmission continuation procedure:
[3]
To continue serial transmission, read 1
from the TDRE flag to confirm that writing is
possible, then write data to TDR1, and then
clear the TDRE flag to 0.
Break output at the end of serial
[4]
transmission:
To output a break in serial transmission, set
PCR for the port corresponding to the SO1
pin to 1, clear PDR to 0, then clear the TE
bit in SCR1 to 0.
[3]
[4]

Advertisement

Table of Contents
loading

Table of Contents