New question on I2C communicationhttp:

Discussion to talk about software related topics only.
bturner5791
Posts: 6
Joined: Tue Dec 01, 2009 10:21 am

Re: New question on I2C communicationhttp:

Post by bturner5791 »

Hi Dave,

No problem, The reason I asked about the 0xA vs 10 was it tried to use the 0xa when the program compiled it complained about the "A" not being defined at that time. I always thought C did not care if it was hex or decemial.

For the pull ups on SDA and SCL I have used both 10k and 1.8k (from LTC2309 data sheet) both have the same issue.

Bob
v8dave
Posts: 333
Joined: Thu Dec 31, 2009 8:31 pm

Re: New question on I2C communicationhttp:

Post by v8dave »

Hi Bob,

Is this being used on your own PCB or one of the development boards?

The reason I ask is that if on development board with the RTC, can you read this during startup. I suspect not as your original code which does the scan of the bus found no devices on the second attempt.

Do you have access to a logic analyser? These are great for finding bus faults and will show if there is any activity from your code on the restart. You could also try a scope and just be sure that the device is sending I2C on the bus the second time around.

This is a nice little low cost unit but limited number of inputs.
http://www.saleae.com/logic/

I have this one which has a lot more options etc. More expensive but worth it in the long run.
http://www.pctestinstruments.com/

Good luck with finding the reason. It will be interesting to see what the issue was once you get it working.

Dave....
bturner5791
Posts: 6
Joined: Tue Dec 01, 2009 10:21 am

Re: New question on I2C communicationhttp:

Post by bturner5791 »

Hi Dave,

It is up and running being very stable, what it turned out to be was the pull up resistor value. I originally used 10k Resistors for pull ups , but I switched to 1.8k (in LTC exapmle). Once I change the resistor out it was stable as a rock. Thanks for the support.

Regards

Bob Turner

8-)
Post Reply