AN1146 STMicroelectronics, AN1146 Datasheet - Page 3

no-image

AN1146

Manufacturer Part Number
AN1146
Description
I2C COMMUNICATION BETWEEN ST52X301 AND EEPROM
Manufacturer
STMicroelectronics
Datasheet
4. Software
The software project for ST52X301 communicating with an EEPROM M24C04 is described in the
followings. Two routines are developed with FUZZYSTUDIO
write and read of a single byte at a specific address. To manage more bytes, a simple modification of
this program must be done.
3.2 Random Address Read Mode
In order to read a byte from an address of the memory, ST52x301 performs a dummy write to load the
address, as shown in figure 4. Then, without sending a STOP condition, ST52x301 sends another
START condition and resends the Device Select Code, with the RW\ bit set to ‘1’. After
acknowledgment, the memory provides onto the bus the contents of the addressed byte. The master is
not required to acknowledge the byte output and terminates the transfer with a STOP condition.
Fig. 4 - Read Mode Sequence
Fig. 5 - Main Window
(I
2
C communication routines between ST52x301 and M24C04 EEPROM)
I
2
C COMMUNICATION BETWEEN ST52x301 AND EEPROM
TM
3.0 to show how to perform operations of
3/14

Related parts for AN1146