Go Down

Topic: Due I2C not working (Read 14 times) previous topic - next topic

Phillip_James

I was under the impression the Due had internal 3.3v pull up resistors on the I2C lines. Is this correct? Nevertheless it is working as is, but just not 100% reliable

chriskner


I was under the impression the Due had internal 3.3v pull up resistors on the I2C lines. Is this correct?

Yes, this is correct.  However, the DUE is a 3.3V system, and the SRF is most-likely a 5V gadget.  If that is the case, then you need a level translator, as the logic thresholds probably do not agree.
Quote
Nevertheless it is working as is, but just not 100% reliable

That is the point.

-Chris

Phillip_James

Well this is where it gets confusing. It works without the logic converter. But not with the logic converter. I have tried two types of logic converters, both bi-directional. The signal comes through but the Arduino will not cooperate

bobcousins

#8
Feb 07, 2013, 02:05 am Last Edit: Feb 07, 2013, 02:39 am by bobcousins Reason: 1
What speed are you running the I2C at? I imagine that with different pullups and level translators there could be a lot of skew on the edges.

ETA: this link http://www.robot-electronics.co.uk/forum/viewtopic.php?f=2&t=250 suggest that the SFR02 uses a PIC micro with VIH = 4V, so a pullup to 3.3V seem to be insufficient. In that case though, I can't see how it works at all, unless there is a lot of tolerance on that 4V level.

I'm keen to find out if level translation on I2C is practical, or whether I need to spec peripherals to be 3.3V only. Unfortunately I haven't the kit to play with at the moment.
Please don't PM me asking for help. Ask questions in the forum.

MartyMacGyver

I'm facing a similar problem: I have a Mega and a Due side-by-side, and am testing a Chronodot and a Wii nunchuck dongle, each running at 3.3V.

Using I2Cscanner (http://playground.arduino.cc/Main/I2cScanner) I can easily get the address of either device (just testing them independently) using the Mega and pins 20/21. The Due fails to see these devices with the same program via the same pins 20/21. No additional pull-ups were used (my understanding is that the appropriate resistors are already present on both boards). Since the peripherals are running at 3.3V Vcc shouldn't be an issue (if anything, I'd expect the Mega to have issues with that, NOT the Due!)

Considering I just spent a fair chunk of change on the Due, I'm a little surprised this is not working... I'm particularly worried that it's some sort of hardware issue (hopefully if it's a software thing that'll be fixed sooner than later). And I've been careful not to overload these inputs. I'm eager to see what you learn...

Note: the software was compiled with the 1.5.1r2 compiler, as well as the 1.5.2-beta (which I rebuilt a day ago). No difference, same symptoms.


Go Up