0
votes

BMP388: what is the maximum of slave addresses in I2C mode

In I2C mode with one master how many BMP388 as slave can be connect to an Arduino UNO? From the datasheet I understand that there are only 2 adresses possible in I2C mode (0x76 or 0x77) as designated by bit 7 in the device address and configured via the SDO (pin 5) port to ground or plus. In SPI mode, as I hope to understand well from the datasheet, it's up to 128 BMP388 addresses.

My questions are: -Am I understanding well that in I2C mode the maximum number of slaves is two? -Of course I can connect a lot of BMP388's in series to the Arduino, but how can I address them in I2C mode. Or should I use SPI mode? -Is there any documentation, except the datasheet, that makes this more clear? -Is there any example Arduino code for the I2C situation?

1
You may use I²C muxes or switches to connect many of the sensors, In case they have something like "enable" pin, you can connect them using GPIOs.0andriy

1 Answers

0
votes

You understood the i2c addressing correctly. There can only be 2 addresses for BMP388 controlled by SDO pin in i2c mode.

If you want to use more than 2 BMP388 units with a single microcontroller, go with SPI. You can use as many BMP388 units as you have GPIO pins on microcontroller to control Slave Select pin.

This is the example from Adafruit BMPxxx library.

Here is permalink to the line where you can pass Slave Select (CS) pin of each unit to each unique object.

Later in the code you can use each object of the Adafruit BMPxxx library to get the readings.