Master receive mode
Set TRS = 0 in ICCR
Set ACKB = 0 in ICSR
1. Select receive mode.
1
2
2. Set acknowledgement data.
3. Start receiving. The first read is a dummy read.
4. Wait for 1 byte to be received.
5. Set acknowledgement data for the last receive.
6. Start the last receive.
Yes
Last receive?
No
Read ICDR
3
4
7. Wait for 1 byte to be received.
8. Select transmit mode.
Read IRIC in ICSR
IRIC = 1?
9. Read the last receive data (if ICDR is read
without selecting transmit mode, receive
operations will resume).
No
10. Generate a stop condition.
Yes
Clear IRIC in ICSR
Set ACKB = 1 in ICSR
Read ICDR
5
6
Read IRIC in ICSR
IRIC = 1?
7
No
Yes
Clear IRIC in ICSR
8
9
Set TRS = 1 in ICCR
Read ICDR
10
Write BBSY = 0
and SCP = 0 in ICSR
End
Figure 13.13 Flowchart for Master Receive Mode (Example)
306