Hitachi H8/3048 Hardware Manual page 525

Single-chip microcomputer
Table of Contents

Advertisement

Receiving Serial Data: The receiving procedure in smart card mode is the same as the normal
SCI procedure. Figure 14-7 shows a flowchart for receiving.
www.DataSheet4U.com
1. Initialize the smart card interface by the procedure given in Initialization at the beginning of
this section.
2. Check that the ORER and PER error flags are cleared to 0 in SSR. If either flag is set, carry
out the necessary error handling, then clear both the ORER and PER flags to 0.
3. Check that the RDRF flag is set to 1. Repeat steps 2 and 3 until this check passes.
4. Read receive data from RDR.
5. To continue receiving data, clear the RDRF flag to 0 and return to step 2.
6. To terminate receiving, clear the RE bit to 0.
Start
Initialize
Start receiving
ORER = 0 and
PER = 0 ?
Yes
No
RDRF = 1 ?
Yes
Read RDR and clear RDRF
flag to 0 in SSR
No
All data received ?
Clear RE bit to 0
Figure 14-7 Receive Flowchart (Example)
515
No
Error handling

Advertisement

Table of Contents
loading

Table of Contents