CPC1302 User Manual
0-30
Description of operation of CPC1302 major components
CPC1302
2.9.1 Algorithm of I2C controller operation
Operation of
I2C controller
is shown in Fig. 2-4 as exemplified by recording 1 data byte.
Beginning
Start of controller
(MEN=1)
Is the bus busy?
Ye
(MBB=1)
No
No
Confirmation is
received?
(RXAK=0)
Yes
Recording of header
I2C to the data register
(address of EEPROM
microchip [7:1] + Write
[0])
Recording of the
EEPROM data byte to
the data register and
continuing writing
transaction (MCF=0)
Transfer mode selection
and transaction start
(MTX=1, MSTA=1)
Transaction
is over?
(MCF=1)
No
Transaction
is over?
(MCF=1)
Yes
No
Yes
Confirmation is
received?
(RXAK=0)
Yes
Writing of the EEPROM
data byte to the data
register and continuing
writing transaction
(MCF=0)
No
Continuing transaction
(automatic generation
STOP- condition)
(MCF=0)
No
Confirmation is
received?
(RXAK=0)
Yes
Generation of
STOP- condition
(MSTA=0) and continuing
transaction (MCF=0)
Transaction
is over?
(MCF=1)
No
Transaction
is over?
(MCF=1)
Yes
No
Yes
End
Fig. 2-4: Algorithm of I2C controller operation (example of writing 1 byte of data to EEPROM Atmel AT24C02)
Yes