Go Down

Topic: Gyro and acceleremeter in one [ADVICE] (Read 842 times) previous topic - next topic

MarkT

Indeed - and its important that when using the I2C bus to a 3V3 device that any pull-ups are to 3.3V, not to 5V.  That board has 10k pull-ups to its own supply rail (which must be 3.3V) if you look at the schematic provided by SparkFun.

And of course you must not enable the SCL or SDA as outputs and pull them HIGH - the I2C library is careful to avoid that and drives them as open-drain outputs (never actively pulled-up).  Just rely on the I2C (Wire) library.
[ I won't respond to messages, use the forum please ]

Krodal

... the I2C library is careful to avoid that and drives them as open-drain outputs (never actively pulled-up)...


MarkT, are you sure ?
I wrote a whole section here : http://arduino.cc/playground/Main/I2CBi-directionalLevelShifter
The Wire library (mistakenly) enables the internal pull-up resistors. But with external pull-up resistors of 4k7 to the 3.3V everything should be fine.

Go Up