Hitachi H8S/2199 Hardware Manual page 456

Single-chip microcomputer
Table of Contents

Advertisement

Initialization
Start reception
Read ORER flag in SSR1
ORER=1
Read RDRF flag in SSR1
No
RDRF=1
Read receive data in RDR1,
and clear RDRF flag in SSR1 to 0
No
All data received?
Clear RE bit in SCR1 to 0
[3]
Error handling
Overrun error handling
Clear ORER flag in
SSR1 to 0
No
Error handling
(Continued below)
Yes
Yes
< End >
< End >
Figure 22.20 Sample Serial Reception Flowchart
SCI initialization:
[1]
[1]
The SI1 pin is automatically designated as
the receive data input pin.
Receive error handling:
[2][3]
IF a receive error occurs, read the ORER
flag in SSR1, and after performing the
[2]
appropriate error handling, clear the ORER
flag to 0. Transfer cannot be resumed if
the ORER flag is set to 1.
Yes
[3]
SCI status check and receive data read:
[4]
Read SSR1 and check that the RDRF flag
is set to 1, then read the receive data in
RDR1 and clear the RDRF flag to 0.
Transition of the RDRF flag from 0 to 1 can
also be identified by and RXI interrupt.
[4]
[5]
Serial reception continuation procedure:
To continue serial reception, before the
MSB (bit 7) of the current frame is received,
finish reading the RDRF flag, reading
RDR1, and clearing the RDRF flag to 0.
[5]
Rev. 1.0, 02/00, page 447 of 1141

Advertisement

Table of Contents
loading

Table of Contents