Datasheet
Inter-Integrated Circuit (S08IICV1)
MC9S08QG8 and MC9S08QG4 Data Sheet, Rev. 5
Freescale Semiconductor 171
Figure 11-11. Typical IIC Interrupt Routine
Clear
Master 
Mode 
?
Tx/Rx 
?
Last Byte 
Tra ns mi tte d
?
RXAK=0 
?
End of 
Addr Cycle 
(Master Rx) 
?
Write Next
Byte to IICD
Switch to 
Rx Mode
Dummy Read 
from IICD
Generate 
Stop Signal
Read Data 
from IICD 
and Store
Set TXACK =1
Generate 
Stop Signal
2nd Last 
Byte to Be Read 
?
Last 
Byte to Be Read 
?
Arbitration 
Lost 
?
Clear ARBL
IAAS=1 
?
IAAS=1 
?
SRW=1 
?
TX/RX 
?
Set TX 
Mode
Write Data 
to IICD
Set RX 
Mode
Dummy Read 
from IICD
ACK from
Receiver 
?
Tx Next 
Byte
Read Data 
from IICD 
and Store
Switch to 
Rx Mode
Dummy Read 
from IICD
RTI
YN
Y
Y
Y
Y
Y
Y
Y
Y
Y
N
N
N
N
N
N
N
N
N
Y
TX RX
RX
TX
(Write)
(Read)
N
IICIF
Address Transfer
Data Transfer
(MST = 0)
(MST = 0)










