3BABY
Member level 5
- Joined
- Jan 14, 2011
- Messages
- 91
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- New Zealand
- Activity points
- 2,252
Hi Guys,
im just starting to work with some I2C EPROMs but im getting confused about the Read/Write sequence.. im confused between these two websites as they seem to have completely opposite ways of Reading and Writing
I2C Tutorial
I2C PIC Interfacing Tutorial - Theory | PyroElectro - News, Projects & Tutorials
and then this website doesnt mention that you need to send a 2nd start Bit..
An I2C Tutorial.
Could someone please confirm that to Write you:
1. Send a start Bit
2. Send the I2C address of the slave with the R/W bit low
3. wait for ACK
4. Send the internal register address you want the data to be written to
5. wait for ACK
6. Send the data byte
7. wait for ACK
8. Send the stop Bit
and to Read you:
1. Send a start Bit
2. Send address of slave with the R/W bit low
3. send ACK
4. Send Internal register address of the byte you want to read
5. send ACK
6. Send a start Bit again
7. Send address of slave with the R/W bit high this time
8. send ACK
9. Read data byte from slave
10. send ACK
11. Send the stop Bit
any help would be much appreciated!
im just starting to work with some I2C EPROMs but im getting confused about the Read/Write sequence.. im confused between these two websites as they seem to have completely opposite ways of Reading and Writing
I2C Tutorial
I2C PIC Interfacing Tutorial - Theory | PyroElectro - News, Projects & Tutorials
and then this website doesnt mention that you need to send a 2nd start Bit..
An I2C Tutorial.
Could someone please confirm that to Write you:
1. Send a start Bit
2. Send the I2C address of the slave with the R/W bit low
3. wait for ACK
4. Send the internal register address you want the data to be written to
5. wait for ACK
6. Send the data byte
7. wait for ACK
8. Send the stop Bit
and to Read you:
1. Send a start Bit
2. Send address of slave with the R/W bit low
3. send ACK
4. Send Internal register address of the byte you want to read
5. send ACK
6. Send a start Bit again
7. Send address of slave with the R/W bit high this time
8. send ACK
9. Read data byte from slave
10. send ACK
11. Send the stop Bit
any help would be much appreciated!