Hitachi H8S/2199 Hardware Manual page 453

Single-chip microcomputer
Table of Contents

Advertisement

 Serial Data Transmission (Synchronous Mode)
Figure 22.18 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
Clear TE bit in
SCR1 to 0
< End >
Rev. 1.0, 02/00, page 444 of 1141
No
Yes
No
Yes
Yes
Figure 22.18 Sample Serial Transmission Flowchart
SCI initialization:
[1]
[1]
The SO2 pin is automatically designated as
the transmit data output pin.
SCI status check and transmit data write:
[2]
Read SSR1 and check that the TDRE flag
[2]
is set to 1, then write transmit data to TDR1
and clear the TDRE flag to 0.
Serial transmission continuation procedure:
[3]
To continue serial transmission, be sure to
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.
[3]
No

Advertisement

Table of Contents
loading

Table of Contents