![Freescale Semiconductor MCF52230 ColdFire Скачать руководство пользователя страница 480](http://html1.mh-extra.com/html/freescale-semiconductor/mcf52230-coldfire/mcf52230-coldfire_reference-manual_2330648480.webp)
I
2
C Interface
Freescale Semiconductor
27-15
MCF52235 ColdFire® Integrated Microcontroller Reference Manual, Rev. 6
Figure 27-14. Flow-Chart of Typical I
2
C Interrupt Routine
Clear
Master
Mode?
TX/Rx
?
Last Byte
Transmitted
?
RXAK= 0
?
End of
ADDR Cycle
(Master RX)
?
Write Next
Byte to I2DR
Switch to
Rx Mode
Dummy Read
from I2DR
Generate
STOP Signal
Read Data
from I2DR
And Store
Set TXAK =1
Generate
STOP Signal
2nd Last
Byte to be
Last
Byte to be
?
Arbitration
Lost?
Clear IAL
IAAS=1
?
IAAS=1
?
SRW=1
?
Tx/Rx
?
Set TX
Mode
Write Data
to I2DR
Set RX
Mode
Dummy Read
from I2DR
ACK from
Receiver
?
Tx Next
Byte
Read Data
from I2DR
and Store
Switch to
Rx Mode
Dummy Read
from I2DR
RTE
Y
N
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
IIF
Address
Cycle
Data
Cycle
Read
Read?
Because
of
an
order
from
the
United
States
International
Trade
Commission,
BGA-packaged
product
lines
and
part
numbers
indicated
here
currently
are
not
available
from
Freescale
for
import
or
sale
in
the
United
States
prior
to
September
2010:MCF52234CVM60,
MCF52235CVM60