Hitachi H8S/2378, H8S/2378R Series Hardware Manual page 777

16 bit single-chip microcomputer
Table of Contents

Advertisement

Slave receive mode
Clear AAS in ICSR
Set ACKBT=0 in ICIER
Dummy read ICDRR
Read RDRF in ICSR
No
RDRF=1 ?
Yes
Yes
The last receive
- 1?
No
Read ICDRR
Set ACKBT=1 in ICIER
Read ICDRR
Read RDRF in ICSR
No
RDRF=1 ?
Yes
Read ICDRR
End
Figure 16.17 Sample Flowchart for Slave Receive Mode
[1] Clear the flag AAS.
[1]
[2] Set the acknowledge for the transmit device.
[2]
[3] Dummy read ICDRR.
[3]
[4] Wait the reception end of 1 byte.
[5] Judge the (last receive - 1).
[4]
[6] Read the received data, and clear RDRF to 0.
[7] Set the acknowledge for the last byte.
[8] Read the received data of the (last byte - 1),
[5]
and clear RDRF to 0.
[9] Wait the reception end of the last byte.
[6]
[10] Read the received data of the last byte,
and clear RDRF to 0.
[7]
[8]
[9]
[10]
Rev. 1.0, 09/01, page 733 of 904

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents