2014-09-26 06:16 AM
2014-09-29 04:44 AM
Hi
''I'm newbie to work with I2C. What's the problem? Why isn't there an acknowledge at the end of the address?'' ''I2C_Send7bitAddress(I2C1, 0x12, I2C_Direction_Transmitter);
''
''
I2C_InitStructure.I2C_OwnAddress1 = 0x08;
''
Assuming that you are using the same init code in the slave device as in the host.
You have not understood the 7 bit addressing of I2C
I think - with own address = 0x08 (on the slave)
The host should be sending address 0x10 for the slave to respond.
2014-10-01 10:51 AM
Hi
Thanks friend. I solved the problem and as you said the problem was addressing. also it doesn't work correctly still(but I have acknowledge now). If I would just connect the debugger to the slave board and start to working, it would work correctly but if the both board would be free(I mean without debugger), I have acknowledge but the master doesn't send the data(I mean0xA1
). note that I have changed the both programs at the first post of the topic. it seems that it's halt again on this line in the master:
while
(!I2C_CheckEvent(I2C1, I2C_EVENT_MASTER_TRANSMITTER_MODE_SELECTED)){}