Hitachi H8/3062 Hardware Manual page 425

Single-chip microcomputer
Hide thumbs Also See for H8/3062:
Table of Contents

Advertisement

Initialize
Start receiving
Read ORER flag in SSR
ORER= 1
No
Read RDRF flag in SSR
No
RDRF= 1
Yes
Read receive data from
RDR, and clear RDRF
flag to 0 in SSR
No
Finished receiving?
Yes
Clear RE bit to 0 in SCR
<End>
Figure 12.18 Sample Flowchart for Serial Receiving
(1)
(2)
Yes
(3)
Error handling
(continued on next page)
(4)
(5)
SCI initialization: the receive data
(1)
input function of the RxD pin is
selected automatically.
Receive error handling: if a receive
(2)(3)
error occurs, read the ORER flag in
SSR, then after executing the
necessary error handling, clear the
ORER flag to 0. Neither transmitting
nor receiving can resume while the
ORER flag remains set to 1.
SCI status check and receive data
(4)
read: read SSR, check that the RDRF
flag is set to 1, then read receive data
from RDR and clear the RDRF flag to
0. Notification that the RDRF flag
has changed from 0 to 1 can also be
given by the RXI interrupt.
To continue receiving serial data:
(5)
check the RDRF flag, read RDR, and
clear the RDRF flag to 0 before the
MSB (bit 7) of the current frame is
received.
407

Advertisement

Table of Contents
loading

Table of Contents