Boron I2C (D0-D1)

Hi,

I’m currently having some issues while talking to an MCP7940N (RTC) using Boron, where my SDA bus hangs at low. The bus is currently using 4.7k pull-up resistors.

What I noticed while debugging using a scope is that while my Boron is trying to connect to the cloud, I can perceive some data noise/data going on the I2C bus.

So my question is, is that noise from the GSM modem bus, or is this I2C bus shared with other onboard I2C stuff on the Boron? If it’s shared, there a table/list with all the addresses on the bus? If it’s not, how problematic is this noise on my bus?

@Gildons,

Sorry to hear you are having issues. I too am using the MCP79410 (assume that is what you meant) and it is working well.

What library are you using? I am using @rickkas7 MCP79410RK.

You can see what else is on the i2b bus by running an i2c scan and reporting out the slave addresses found. I have put some code below but let me know if you need more:

bool i2cScan() {                                            // Scan the i2c bus and publish the list of devices found
	byte error, address;
	int nDevices = 0;
  strncpy(resultStr,"i2c device(s) found at: ",sizeof(resultStr));

	for(address = 1; address < 127; address++ )
	{
		// The i2c_scanner uses the return value of
		// the Write.endTransmisstion to see if
		// a device did acknowledge to the address.
		Wire.beginTransmission(address);
		error = Wire.endTransmission();

		if (error == 0)
		{
      char tempString[4];
      snprintf(tempString, sizeof(tempString), "%02X ",address);
      strncat(resultStr,tempString,4);
			nDevices++;
      if (nDevices == 9) break;                    // All we have space to report in resultStr
		}

		else if (error==4) {
      snprintf(resultStr,sizeof(resultStr),"Unknown error at address %02X", address);
      return 0;
		}
	}

I hope this helps.

Chip

@chipmc

No, I’m actually using the MCO7940N but they are very similar, even share the same address for the RTC.

I just figured out what was happening. One of my I2C buffers didn’t have a pull-up resistor on the “remote” side, the moment that I added the pull-up resistor is behaving as expected.

The noise that I was seen before also appears to have improve, but I’ll do some more testing on that.

1 Like