SCL and SDA limitations

I am working on an automation project and I was wondering if there are more than just the two SDA and SCL pins listed for the Arduino Mega R3. If not, is there a way to implement multiple devices on the same pins? Essentially I have the following devices hich all require SCL and SDA connections: RTC (real time clock), pH circuit/probe, EC (electroconductivity) circuit/probe, I2C LCD module, and possibly communication with an additional Arduino (uno). Is this possible? If so, how?

You can. have many devices connected. They will have separate chip select lines

knut_ny: You can. have many devices connected. They will have separate chip select lines

He can, as long as his devices have different I2C addresses, no chip select line involved.

Ciao, Ale.

Jbock790: I am working on an automation project and I was wondering if there are more than just the two SDA and SCL pins listed for the Arduino Mega R3. If not, is there a way to implement multiple devices on the same pins? Essentially I have the following devices hich all require SCL and SDA connections: RTC (real time clock), pH circuit/probe, EC (electroconductivity) circuit/probe, I2C LCD module, and possibly communication with an additional Arduino (uno). Is this possible? If so, how?

The number of I2C devices that can connect to ONE I2C buss is limited by two factors:

  • The first is that all devices must have their own unique address.
  • The second is that the total capacitance of the network is 400pF. This limitation usually shows up if you add long wires connecting your sensors, try to limit the total wire length to less than 1m.

Chuck.

Jbock790: ...I was wondering if there are more than just the two SDA and SCL pins listed for the Arduino Mega R3...

AFAIK all the AVRs used in Arduinos only have a single I2C port, on the R3 boards the signals are brought out to a second set of pins that (on some boards) are also connected to the old A4/A5 pair but there is still only a single port.

One exception that I know of is the Due, that has two I2C ports broken out to the connectors.

Not that any of that matters because as noted above you should be able to connect all those devices on a single ort.

Let's say they do have separate addresses, whigh pins would I select to use to transmit data?

In the case that they don't have separate addresses (have yet to check, still early on in the project) is there a way to use a multiplexor or some other chip to separate out the signals if they do end up being read from the same pin?

Let's say they do have separate addresses, whigh pins would I select to use to transmit data?

All data transfer uses the same two pins.

In the case that they don't have separate addresses (have yet to check, still early on in the project) is there a way to use a multiplexor or some other chip to separate out the signals

Yes.

whigh pins would I select to use to transmit data?

You have no choice, SDA for data and SCL for clock.

is there a way to use a multiplexor or some other chip to separate out the signals if they do end up being read from the same pin?

Yes, look up chips like the LTC4305

Many (but not all) i2c devices give you the chance to select from two or more possible addresses. This means you can connect more than one identical devices to the bus. Choosing the address is normally done by making solder bridges across pairs of contacts, or by wiring certain pins to high/low on a chip.

In the picture bellow you can see 3 pairs of solder pads labelled A0,1&2. Making solder bridge across these pads enables up to 8 addresses to be selected and 8 of these modules to be used on the same bus.

1427-00_1024x1024.jpg