Hitachi H8/3008 Hardware Manual page 361

16-bit microcomputer
Table of Contents

Advertisement

• Transmitting Serial Data (Asynchronous Mode): Figure 12.5 shows a sample flowchart for
transmitting serial data and indicates the procedure to follow.
Initialize
Start transmitting
Read TDRE flag in SSR
TDRE= 1
Write transmit data in TDR
and clear TDRE flag to 0 in SSR
All data transmitted?
Read TEND flag in SSR
TEND= 1
Output break signal?
Clear DR bit to 0 and set
DDR bit to 1
Clear TE bit to 0 in SCR
<End>
Figure 12.5 Sample Flowchart for Transmitting Serial Data
No
Yes
No
Yes
No
Yes
No
Yes
(1)
(1)
SCI initialization:
the transmit data output function of
the TxD pin is selected automatically.
After the TE bit is set to 1, one frame
of 1s is output, then transmission is
possible.
(2)
(2)
SCI status check and transmit data
write:
read SSR and check that the TDRE
flag is set to 1, then write transmit data
in TDR and clear the TDRE flag to 0.
(3)
To continue transmitting serial data:
after checking that the TDRE flag is 1,
indicating that data can be written,
write data in TDR, then clear the
TDRE flag to 0.
(4)
To output a break signal at the end of
(3)
serial transmission:
set the DDR bit to 1 and clear the DR
bit to 0, then clear the TE bit to 0 in
SCR.
(4)
345

Advertisement

Table of Contents
loading

Table of Contents