Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN1782 Datasheet(PDF) 4 Page - STMicroelectronics

Part # AN1782
Description  STR71X I2C COMMUNICATION WITH M24CXX EEPROM
PDF  7 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1782 Datasheet(HTML) 4 Page - STMicroelectronics

  AN1782 Datasheet HTML 1Page - STMicroelectronics AN1782 Datasheet HTML 2Page - STMicroelectronics AN1782 Datasheet HTML 3Page - STMicroelectronics AN1782 Datasheet HTML 4Page - STMicroelectronics AN1782 Datasheet HTML 5Page - STMicroelectronics AN1782 Datasheet HTML 6Page - STMicroelectronics AN1782 Datasheet HTML 7Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 4 / 7 page
background image
4/7
I2C COMMUNICATION BETWEEN STR71X AND M24CXX EEPROM
Example:
This example shows a write of data values 0x05 and 0xE0 to address 0x00 and 0x01 of
M24C08 Block3 respectively
.
3.2.2 Wait for Write Operation
Before starting any new operation with the EEPROM, we wait until the write operation is fin-
ished. The EEPROM will send the ACK bit if busy with the write operation, so the processor
has to send the EEPROM address continuously until the EEPROM sends the ACK bit.
3.2.3 Read Operation
To initiate the communication, the STR71x I2C has to generate a START condition and then
send the M24C08 Address (with R/W bit cleared). After checking the correct status of the pre-
vious transmission, the Master writes, in the Data Register (DR), the address of the first byte
we want to read from the M24C08. The previous byte transmission check is done by looping
on the BTF flag in the Status Register 1 (SR1).
Then the STR71x I2C has to regenerate the START condition and then write the slave ad-
dress in the Data Register (DR). This address must be the same as the address sent after the
first START condition except that the least significant bit (R/W) must be set. Then a previous
byte transmission check is done by looping on the ENDAD flag in Status Register 2 (SR2).
After this, the STR71x I2C becomes a receiver for all bytes sent from the M24C08. To receive
a new data byte, the previous byte reception has to be completed correctly. The byte reception
check is done by looping on the BTF flag in Status Register 1 (SR1). This flag is cleared by
reading the Data Register (DR).
To close the communication, before reading the last byte from the DR register, set the STOP
bit to generate the Stop condition. The interface goes automatically back to slave mode (M/SL
bit cleared). In order to generate the non-acknowledge pulse after the last received data byte,
the ACK bit must be cleared just before reading the second last data byte.
START
0xAE
0
00
0
0x05
0
0xE0
0
STOP
Slave Address(R/W)=0
ACK
Byte Address
ACK
DATA1
ACK
DATA2
ACK



Html Pages

1 2 3 4 5 6 7


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com