AN1525 STMicroelectronics, AN1525 Datasheet - Page 3

no-image

AN1525

Manufacturer Part Number
AN1525
Description
I2C COMMUNICATION BETWEEN ST52X520 AND EEPROM
Manufacturer
STMicroelectronics
Datasheet
AN1525 - APPLICATION NOTE
3.2 Random Address Read Mode
In order to read a series of data from a memory address, empty writing (dummy write) must be performed
to set the memory address location where to start reading. As shown in Figure 4, after the START condi-
tion, the microcontroller sends the Device Select Code with the RW bit reset to ‘0’ (as in the writing oper-
ation). After receiving the ACK, the microcontroller sends the address of the memory location where to
begin reading. Then, after receiving the ACK from the memory, the microcontroller sends another START
condition followed by a new Device Select Code, but this time with the RW bit set to ‘1’. After receiving an
ACK, the memory begins transmitting data that will be received sequentially by the ST52x520, which is
each followed by an ACK. The microcontroller wont have to send an ACK after receiving the last byte.
Receiving will end with a STOP condition.
Figure 4. RANDOM ADDRESS READ MODE
4 SOFTWARE DESCRIPTION
2
The following section describes the software to communicate with the ST52x520 via an I
C type EEPROM
ST24C04. The software is developed with Visual FIVE and allows sequential writing of a maximum of 8
bytes (for ST24C04) to a certain memory address and the reading, afterwards, of the same amount of
bytes. The software that is proposed can be found in file I2CGP.FS4 (see file AN1525.FS4 in the applica-
tion note page at the following web site: http://www.st.com/five ).
2
Figure 5. I
C DEVICE CONFIGURATION WINDOW
3/12

Related parts for AN1525