chipKIT® Development Platform

Inspired by Arduino™

MAX32 Two I2C devices hangs on wire.begin

Created Mon, 30 Sep 2013 23:07:14 +0000 by Sprigo


Sprigo

Mon, 30 Sep 2013 23:07:14 +0000

I'm trying to use a DS3231 RTC and a MCP23017 I2C expander in my project. Individually both libraries work as expected but when I try using both in the same project the sketch hangs on the second call to wire.begin().

The same project works fine on an Arduino Mega.

I'm using MPIDE 20130715. Anyone else come across this problem?


les1943

Tue, 01 Oct 2013 08:09:35 +0000

I had similar UNO I2C with RTC and expander, no problems I think you only need one wire.begin() in setup().


samdesd

Fri, 02 May 2014 10:17:05 +0000

Hi Sprigo,

Do you mind to share the DS3231 code with me?

Thank you.

SAM


majenko

Fri, 02 May 2014 11:32:25 +0000

The most common problem is that the two libraries call Wire.begin() in their initialization routines. You will need to edit one of the libraries and remove the Wire.begin() from it. Do it to the one you initialize second ;)