Datasheet

Section 22 Synchronous Serial Communication Unit (SSU)
Page 790 of 982 REJ09B0465-0300 Rev. 3.00
Sep 17, 2010
H8S/20103, H8S/20203, H8S/20223, H8S/20115, H8S/20215, H8S/20235 Group
Figure 22.9 shows a sample flowchart for serial transmit and receive operations.
Ye s
Ye s
Ye s
No
Start
Initialization
Read TDRE in SSSR
[1]
[2]
[3]
[4]
[1] After reading SSSR and confirming that
the TDRE bit is 1, write transmit data in
SSTDR. Then the TDRE bit is automatically
cleared to 0.
[2] Confirm that the RDRF bit is 1. If the RDRF
bit is 1, receive data in SSRDR is read. If the
SSRDR bit is read, the RDRF bit is automatically
cleared.
[3] Determine whether data transmission is continued.
[4] To end transmit and receive mode, clear both of
the TE and RE bits in SSER to 0 at the same time or
the TE bit after the RE bit to 0, after clearing the TEND bit to 0.
TDRE = 1?
Write transmit data
in SSTDR
Read RDRF in SSSR
RDRF = 1?
No
No
Read receive data
in SSRDR
Data transmission
continued?
Clear TEND to 0 and
clear RE and TE in
SSER to 0
End
Figure 22.9 Sample Flowchart for Serial Transmit and Receive Operations