This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2253: i2c multiple slave with same address

Part Number: MSP430G2253
Other Parts Discussed in Thread: MSP430F5529, MSP430G2553, MSP430FR5969, LMP91000

Hi

I want to use a couple of MAG3110 and it can only communicate using i2c. But I can't change the address. Is there any way to communicate with multiple sensors of the same address in the same i2c bus. I have access to MSP430G2553 and MSP430F5529, both of them has one module for i2c. I could try controlling both sensors' active period using a timer, but I want them to show data of same time period as I will later compare them. Any advice will be appreciated.

  • Hi Nabil,

    You could use a software bit bang solution to control the second I2C bus, there are several examples provided by the online community. Since the magnetometer's maximum active current is less than 1 mA another option is to control the MAG3110 supply voltage pins with a MSP430 GPIO. But either of these options will not help sample data at the exact same time.

    Regards,
    Ryan
  • Thanks Ryan
    I just found out that F5529 has 2 separate modules for I2C. So I should be able to use them for 2 sensors.
  • Hello Ryan,

    Its happen in my office only. Just take it the example like i have smoke detection sensor who is working on the I2C Communication. and i am using MSP430FR5969 controller. let's take example 5 sensors are there. so how can i connect this to my controller, because they have same address. and most of the GPIO pins are already busy with some other modules.
    Is there any another solution is available.

    thanks
    Anil D.
  • Please be specific. What is the part number for your smoke detector?

    I2C proper doesn't provide for multiple slave devices with the same address. However, many specific devices provide out of band selection mechanisms. The LMP91000, e.g. has an explicit Chip Select. The M24512 has pins to set the address bits. Reading the MAG3110 data sheet, I (nor Nabil Ch, nor Ryan Brown1) don't see any provision like that. In a pinch (as Ryan pointed out), one can often use power control (powering the sensor through a GPIO), but the requirements of this design preclude that.

    At the cost of extra complexity (hardware+software) you could used an I2C multiplexer e.g. PCA9547.

    Unsolicited: The I2C ("Inter-IC") bus was designed for physically short buses, measured perhaps in centimeters, where I would expect smoke detector deployment would be measured in (at least) decameters. You should probably do the electricals to assure your design is feasible.