AnsweredAssumed Answered

ADuC7061 I2C problem

Question asked by P.H.B.A on Apr 20, 2015
Latest reply on Apr 22, 2015 by MMA


I was testing ADuC7061 I2C functionnality using 2 ADuC7061 evaluation kit (1 as Master and the other as Slave) and programs codes providing in the I2C_BASIC folder (that comes with the installation CD), I used 2 resistors of 4.7 Kohms to pull-up SDA and SCL line to 2,5 V, both Master and Slave are powered from the same source.

1) In the I2C_Slave code, line 55 to 57:  I2CSCON = BIT0 + BIT4     // Enable I2C Slave + Enable Rx interrupt +

                                                                           + BIT9 + BIT10     // Enable Rx interrupt + Enable Tx interrupt +

                                                                           + BIT10               // Enable "Stop-after-Start-Detected" IRQ.

Should it be "BIT8" instead of "BIT10" at the end in order to enable the stop after start detected IRQ ?

2) I modified the I2C_Slave slightly so that the ADuC7061 slave lights up a LED on port 2.0 on start up, and when it receives data from the Master, it turns the LED off, but it's not working as expected, the LED's always on (programs codes in attachments). 


So is there something wrong with my set up or my program code ? I tried the i2cserial.exe application and the programs codes in I2C_EPPROM folder too (also with 2 ADuC7061) but always stuck when try reading data from the slave.


Thanks in advance for your answers and best regards.