I
2
C Programming Examples
MOTOROLA
I
2
C Module
29-17
Figure 29-5. Flow Chart of Typical I
2
C Interrupt Routine
Generate
STOP Signal
Clear IIF
Master Mode?
Yes
No
Arbitration Lost?
Yes
No
Clear IAL
IAAS=1?
SRW=1?
IAAS=1?
Yes
No
Tx/Rx?
No
Data
Cycle
Address
Cycle
Yes
ACK from
Receiver?
Rx
(Read)
Yes
Tx
No
(Write)
Set Tx Mode
Write Data
to I2DR
Tx Next Byte
Set Rx Mode
Dummy Read
from I2DR
Dummy Read
from I2DR
Switch to
Rx Mode
Read Data
from I2DR
and Store
No
Yes
Read Data
from I2DR
and Store
Dummy Read
from I2DR
Switch to
Rx Mode
Generate
STOP Signal
Write Next
Byte to I2DR
Set TXAK=1
Tx/Rx?
Last Byte
Transmitted?
Last Byte
to be Read?
Yes
No
2nd Last
Byte to be
Read?
Yes
No
Rx
Tx
No
Yes
RXAK=0?
No
End of
ADDR Cycle
(Master Rx)
?
Yes
No
Yes
RTE
Summary of Contents for DragonBall MC9328MX1
Page 68: ...1 12 MC9328MX1 Reference Manual MOTOROLA Introduction ...
Page 86: ...2 18 MC9328MX1 Reference Manual MOTOROLA Signal Descriptions and Pin Assignments ...
Page 116: ...3 30 MC9328MX1 Reference Manual MOTOROLA Memory Map ...
Page 126: ...4 10 MC9328MX1 Reference Manual MOTOROLA ARM920T Processor ...
Page 160: ...8 8 MC9328MX1 Reference Manual MOTOROLA System Control ...
Page 272: ...13 32 MC9328MX1 Reference Manual MOTOROLA DMA Controller ...
Page 281: ...Programming Model MOTOROLA Watchdog Timer Module 14 9 ...
Page 282: ...14 10 MC9328MX1 Reference Manual MOTOROLA Watchdog Timer Module ...
Page 300: ...15 18 MC9328MX1 Reference Manual MOTOROLA Analog Signal Processor ASP ...
Page 438: ...18 16 MC9328MX1 Reference Manual MOTOROLA Serial Peripheral Interface Modules SPI 1 and SPI 2 ...
Page 478: ...19 40 MC9328MX1 Reference Manual MOTOROLA LCD Controller ...
Page 574: ...21 32 MC9328MX1 Reference Manual MOTOROLA Memory Stick Host Controller MSHC Module ...
Page 598: ...23 16 MC9328MX1 Reference Manual MOTOROLA Real Time Clock RTC ...
Page 670: ...24 72 MC9328MX1 Reference Manual MOTOROLA SDRAM Memory Controller ...
Page 726: ...25 56 MC9328MX1 Reference Manual MOTOROLA SmartCard Interface Module SIM ...
Page 736: ...26 10 MC9328MX1 Reference Manual MOTOROLA General Purpose Timers ...
Page 854: ...29 18 MC9328MX1 Reference Manual MOTOROLA I2C Module ...
Page 900: ...30 46 MC9328MX1 Reference Manual MOTOROLA Synchronous Serial Interface SSI ...
Page 942: ...32 26 MC9328MX1 Reference Manual MOTOROLA GPIO Module and I O Multiplexer IOMUX ...