English
Language : 

AN971 Datasheet, PDF (5/7 Pages) STMicroelectronics – The goal of this application note is to present an practical example
I2C COMMUNICATION BETWEEN ST7 AND M24Cxx EEPROM
2.7 COMMUNICATING WITH THE I2C EEPROM
The communication protocol between the ST7 and the external M24Cxx EEPROM is given in
Figure 2. For more details, please refer to the ST24C08 datasheet.
Figure 2. I2C Communication Protocol
Write data from ST7 to EEPROM
START EEPROM @ ACK SUB @ ACK DATA 1 ACK DATA 2
DATA N-1 ACK DATA N ACK STOP
Read data from EEPROM to ST7
START EEPROM @ ACK SUB @ ACK START EEPROM @
ACK DATA 1 ACK
DATA N NACK STOP
The ST7 / M24Cxx communication application is based on two steps:
– Write the content of an output buffer (from the ST7 ROM) in the M24Cxx EEPROM
– Read this written buffer from the M24Cxx EEPROM to the ST7 RAM.
Figure 3. shows the flowchart of these two steps.
Figure 3. Communication Application Flowchart
Write data from ST7 to EEPROM
INITIATE TRANSMISSION
(START + SLAVE @)
SEND SUB @ DATA
yes
END OF
BUFFER
no
SEND NEXT BUFFER DATA
Read data from EEPROM to ST7
INITIATE TRANSMISSION
(START + SLAVE @)
SEND SUB @ DATA
INITIATE RECEPTION
(START + SLAVE @ with LSB set)
no
2nd LAST DATA
TO RECEIVE
yes
CLEAR ACKNOWLEDGE BIT
SET THE STOP CONDITION BIT
no
LAST DATA
TO RECEIVE
yes
SET THE STOP CONDITION BIT
RECEIVE NEXT BUFFER DATA
no
END OF
RECEPTION
yes
5/7