Go Down

Topic: Faster i2c? (Read 1 time) previous topic - next topic


I am trying to read data off of a AD7747 capacitance sensor at 45Hz but with the Wire library I get a refresh rate of just under 7Hz. I increased the i2c speed from 100KHz to 400KHz without much of a speed gain and also tried using the i2c library from avrlib, but I get undefined reference errors even though it is included and compiles. Is there any way to speed up the Wire library or get the avrlib i2c library to work?

Coding Badly

I suspect you're barking up the wrong tree.  According to the datasheet, the conversion rate ranges from ~45Hz down to ~4.5Hz.  Have you set the chip to a fast conversion / lower resolution mode?


As CodingBadly said, changing the clock speed of the interface will have no effect whatsoever on the update rate.
If you look at the block diagram of the device, the conversion circuit has its own clock.
Looks like you need to play with the configuration register (address 0x0A).
Per Arduino ad Astra


In my setup routine I configure the chip for 45Hz but when I time a 1000x loop of reading from the device the rate is only about 7Hz.

Coding Badly

As far as I can tell, you're convinced the I2C wiring is correct and the software is correct.  That leaves two possibilities...

1. Despite the documentation, the chip does not support updates faster than 7Hz

2. The chip is damaged

If you provide more information, other possibilities could be considered.


3. You are doing something else in the loop like printing out that is taking the time.

Go Up