control several accelerometers

hi to all i am trying to control several accelerometers(LIS3LV02DQ) with one microcontroler(atmega16) using I2C interface and my problem is how to adress the slaves(accelerometers).all of the slaves have the same adress in Who Am I register

in other words i dont know what must be written in SLA+R/W section, Thank you for any help best regards

Reply to
mahsayeh
Loading thread data ...

It would be easier to use the analog accelerometers. Some AVRs have

16 channels and you can read from 5 3-axis accelerometers at the same time.
Reply to
linnix

You need a I2C mux like the 8 channel PCA9547

or

use SPI with a seperate CS line for each LIS3LV02DQ

Reply to
steve

mahsayeh schrieb:

Why I2C?

I2C is the cause for your problem here. Why not try SPI and CS for each chip?

If you don't have enough outputs, a demultiplexer (like 74*138) may help.

Falk

Reply to
Falk Willberg

Because no pins of this device are dedicated as slave address pins, you can't have more than one on the I2C bus. An alternative is to supply a chip select signal for each device, and then use SPI, which it also supports.

--Gene

Reply to
Gene S. Berkowitz

If you have enough pins on the microcontroller, you can use a separate I2C interface for each device (bitbanged I2C master is easy to do).

Reply to
David Brown

Two on the same bus, actually. One is connected as usual, the other one by bit banging with SCL and SDA swapped.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

Would it be feasible to do 3 accelerometers by bit-banging using just

4 pins---a separate SCL line for each accelerometer and a common SDA line? I can't remember the I2C specs well enough to recall whether the SDA line from the device stays high (OC off) when the SCL line is stable.

Mark Borgerson

Reply to
Mark Borgerson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.