0
\$\begingroup\$

I want to use two I2C RGB color sensors (TCS3414-A) in Arduino, but I cannot figure how I change his adresses and I'm asking this because I want them both in use.

They come with 0x39 as default addresses, but as I want to change one to 0x40 and I don't know how to change it, I come here to ask you how I can solve that.

Regards, Fábio.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ You could have at least given us a link to the datasheet that you need help with. \$\endgroup\$ Commented Apr 19, 2017 at 19:46

2 Answers 2

3
\$\begingroup\$

You cannot. The TCS3414 is only available in slave address 0x39. There is the alternative parts 3413, 3415, and 3416 which have address 0x29, 0x49 and 0x59. Or you can use a i2c bus switch to have two i2c buses.

\$\endgroup\$
1
\$\begingroup\$

I want to change one to 0x40

As Passerby said, you can't change the I2C address on the (now obsolete) TCS3414 itself. The manufacturer produced different ICs with different I2C addresses. The list of I2C addresses on that range of colour sensors, is shown in the datasheet:

TCS34xx I2C addresses

Therefore if you need to access two of those ICs, you need to consider other options, including:

  • Use multiple I2C buses, with one TCS3414 on each bus. Since you mention Arduino, you could put one sensor on the normal hardware I2C bus, and then use a Software I2C master library, to add another I2C bus for the second sensor.
  • Use an I2C bus translator (see this document from Linear Technology for examples). These ICs can re-write the I2C address to a second identical device "on-the-fly". My answer on this very similar question also applies here.
  • Use either a "home brew" or ready-made I2C bus isolator or multiplexer, to switch a single I2C bus master to each of the colour sensors, one at a time. That would require you to switch the I2C bus to connect to sensor 1, before using that one. Then disconnect from sensor 1 and connect the master to sensor 2 (you may need to add a small delay here, depending on bus capacitance). Repeat as needed.
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.