I just found out that two modules I am trying to use (uv / ir light and altimeter) both use the same i2c slave address. Is there any way to setup another copy of the Wire library using two different pins so I could talk to each module on different i2c busses? I’m sure we can do a bit bang i2c instead of hardware i2c.
There’s no option to change the I2C address?
We might need a port of the Software I2C… http://playground.arduino.cc/Main/SoftwareI2CLibrary
Or see if there happen to be other pins exposed on the core which doubles up as I2C (i highly doubt so)
Not that I could find. Adafruit SI1145 Digital UV / IR sensor and MPL31145 barometric sensor.
Both are using 0x60 as the slave address and there are no address pins. The freescale MPL31145 did have a note about contacting the factory for additional slave address info but I would imagine they would want a fee to program the devices.
That library is all assembly language so it would take some porting.
Seems like you might have some luck changing the i2c address for the altimeter.
The other freescale barometric sensor is kinda fixed.
@jamesarm97 and @kennethlimcp, another member, @Pete, playing with I2C OLED displays uses THIS Sparkfun multiplexer to switch between multiple I2C device. The SCL line is wired to all I2C modules and the SDA line is switched via the module.
I might have to go that route. The BUSADDR command tells the chip to use the I2C address that can be programmed into a Param RAM location so I would still need to write to the device in order to change it initially and then that does not survive a reset so I would still need a way to switch the other chip out of the circuit in order to program it. I was hoping the global address 0x00 could be used but that only seems to have limited functions on this chip.
Thanks. I’ll look into that for a solution. I temporarily added two transistors inline with the clock and enable each of the transistors to allow passing of the clock signal to the chip. I enable one and disable the other. Seems to work ok for now.
Can i use ads1115 for getting one more i2c bus connection?
@seaurchin, the ADS1115 is a 4-channel ADC so I’m not sure what you mean by “getting one more i2c bus connection”? If you want to add the ADS1115 to your existing i2c bus then as long as its address doesn’t conflict with other i2c devices on the bus, it will work.