I2C Usage

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 I found I2C (using EZI2Cs UM) was not working in one of the oroject when i changed the system clock from 24 MHZ to 6 MHZ, where as it was working when the system clock was at 24 MHZ. The I2C Clock was at 100K Standard.

   

In my code i was disabling and enabling the EZI2Cs interrupt in the begining and at the end of while (1) loop respectively.

   

I was not able to detect the I2C device on Bride Control Panel when i am set system clock is 6MHZ.

   

what is the reason for this behaviour? 

0 Likes
1 Reply
Anonymous
Not applicable

 The most possible reason for this behaviour is due to enabling and disabling interrupts with clock speed being at 6MHz.

   

 In this situation if the I2C Speed is reduced 50 Khz, there will be no NACKing will observed and I2C will work as expected.

   

 

   

So the thumb rule is to reduce the I2C speed as low as possible, when I2C Interrupts will be disabled and enabled in the main code.

0 Likes