??? 12/08/06 11:46 Read: times |
#129175 - I2C Bus |
Hi All,
Nowadays,I'm studying I2C bus communication protocol. Generally I understood the logic. But I'm confused with Acknowledge signal. Let's assume that we have a 8051 micro. and two EEPROM devices. When we wanted to write data to the 1st EEPROM, firstly we have got to give start command to the bus, then 1st EE addres data and Write signal(only one '0'bit). Later on, (as far as i understand) we wait for an acknowledge signal from the slave to specify that the slave-IC is ready to communicate. I examined the I2C bus code example from the code library.(Little part of it is below) . . ACK: ;acknowledge from transmitter or receiver CLR SDA SETB SCL CLR SCL RET . . NO_ACK: ;no acknowledge from transmitter or receiver SETB SDA SETB SCL CLR SCL RET . . . EEPROM_WRITE: ;write in to eeprom LCALL I2C_START LCALL EEPROM_WRITE_ADDR LCALL ACK MOV A,DPH LCALL I2C_WRITE (Code Owner: Mehdi N. Rahni) LCALL ACK causes to branch the program and produce ACK signal on the bus. This is made by the micro. But this ACK signal must be made by the slave IC and the micro. must read the bus situation whether ACK is on the bus or not, I think. If I'm wrong please tell me the correct logic. Best Regards, Batuhan |
Topic | Author | Date |
I2C Bus | 01/01/70 00:00 | |
it's wrong, but working... | 01/01/70 00:00 | |
if you have to | 01/01/70 00:00 | |
Remove the EEPROM![]() | 01/01/70 00:00 | |
Unfortunately, I have to... | 01/01/70 00:00 | |
Atmel appnote | 01/01/70 00:00 | |
Thanks,I\\\'ll correct the code now | 01/01/70 00:00 | |
receive doesn't work | 01/01/70 00:00 | |
sorry | 01/01/70 00:00 |