Replies: 1 comment 1 reply
-
You'd fundamentally need to split the peripherals up so they're not all directly connected to the same I2C bus. With the AD0 pin, you can have as many as two on the same bus, but you'd need 4 separate buses to make that work. The library by itself isn't built to work with more than one I2C bus, though with recent additions to the core I think the best approach is to add a dedicated I2C multiplexer into the system, unless there's a reason not to (e.g. too much speed lost during switching). Something like the TI TCA9548A might work: https://www.ti.com/product/TCA9548A This way, you have only one I2C bus to manage on the host MCU end, and you simply select which device you want to use at any given moment via the mux (3 I/Os necessary for device selection). |
Beta Was this translation helpful? Give feedback.
-
Hi I need to work with 8 adxl345 at the same time, is it possible to use your library for this task?
I think I can do it with 2 using the SD0 pin in HIGH or LOW, but can it handle 8 or whats the max?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions