cancel
Showing results for 
Search instead for 
Did you mean: 

I2C not working properly

aloisp
Associate II
Posted on September 18, 2009 at 18:07

I2C not working properly

14 REPLIES 14
hugh2
Associate II
Posted on May 17, 2011 at 09:36

Yes I have.

The log of transactions show that the bus works sometimes, and then hangs waiting for the event flags.

daniel8
Associate II
Posted on May 17, 2011 at 09:36

How many devices do you have hooked up to the I2C bus? And what are the pull-ups you are using? There is a max capacitance spec (I believe its 400pF) that needs to be met.

I've found that its better to have stronger pull-ups (especially if you have several devices on the bus).

The one thing you can try is to decrease the speed of the bus (run it at 100k), and see if that gives you better reliability.

daniel8
Associate II
Posted on May 17, 2011 at 09:36

The only suggestion at this time that I have is to lower the pull-ups (to around 5-10k).

Two devices should not exceed the input capacitance requirements of the bus.

Daniel

hugh2
Associate II
Posted on May 17, 2011 at 09:36

I have 2 devices.

4k7 pull-ups and am running at 100,000kbps.

Thanks for your input. Keep going.

fred_blais5
Associate II
Posted on May 17, 2011 at 09:36

Quote:

On 01-02-2007 at 14:23, k7g2lm3 wrote:

Hello,

is there anybody who managed to have I2C working properly and could help me? My problem is that only start and stop bit work, but no address or data is sent over the bus.

hi, I have the exact same problem, I can see the start bit, but no 7bit address. My code is inspired by k7g2lm3 code, except that I use the I2C1 port. I took a look to the solution of his problem, disabling other GPIO but it did not worked for me.. :(

Anyone as an idea?

k7g2lm3, if you see that, it would be great to have your advice on this!