Welcome! Log In Create A New Profile

Advanced

I2C with Arduino Due can't get it to work

Posted by amigob 
I2C with Arduino Due can't get it to work
April 17, 2016 03:47PM
So I have a simple program that I run on an Arduino pro mini and I get nice answer from the IR temperature sensor
and can print this to serial port.

And if I look with my scope/logic analyzer I see this.


but when I compile and upload it for the due I get this ( no temperature only FF )

I already decreased the speed to 50kHz and 20 kHz, started at 100kHz.
The only difference I see is that with the pro mini you see a small delay between writes and reads.

I am already 2 days busy with this and I have no clue, and don't know what to do next ?

Edited 1 time(s). Last edit at 04/17/2016 03:48PM by amigob.


P3steel DXL, with Due/RADDS/Raps128 dual Wade's extruder
Re: I2C with Arduino Due can't get it to work
April 17, 2016 04:13PM
The Due has some quirks with I2C. Have you tried adding delays?

But you need to post more details, to the level at which someone else could reproduce your problem. i.e.

what is the sensor
what is the circuit (schematic)
what is the version of Arduino IDE
what make of Due
What is the smallest sketch to show the problem


What is Open Source?
What is Open Source Hardware?
Open Source in a nutshell: the Four Freedoms
CC BY-NC is not an Open Source license
Re: I2C with Arduino Due can't get it to work
April 17, 2016 04:24PM
sensor : MLX90614 3.3V [www.adafruit.com]
code is from also from adafruit [learn.adafruit.com]
arduino 1.58
Due Clone brand I don't know, but I know that I2C works with the eeprom on my RADDS.

I can't add the delay in between the writes and reads, the clock is not controlled on application level.

Edited 1 time(s). Last edit at 04/17/2016 04:28PM by amigob.


P3steel DXL, with Due/RADDS/Raps128 dual Wade's extruder
Re: I2C with Arduino Due can't get it to work
April 18, 2016 04:06PM
Now got it working on Due, I got a new version of twi.c/h and Wire.cpp/h from the github

And changing the firmware code a little bit and it works now.
So now I have to integrate it in repetier, I am going to use the Wire library although Repetier has made there own versions.


P3steel DXL, with Due/RADDS/Raps128 dual Wade's extruder
Re: I2C with Arduino Due can't get it to work
July 27, 2016 02:35AM
My DUE detect EEPROM, but always show me 0xFF after reading sad smiley

what is it wrong?
I2C Scanner
Scanning...
I2C device found at address 0x50 !
I2C device found at address 0x51 !
I2C device found at address 0x52 !
I2C device found at address 0x53 !
I2C device found at address 0x54 !
I2C device found at address 0x55 !
I2C device found at address 0x56 !
I2C device found at address 0x57 !
done


If I remove EEPROM it says found nothing
Sorry, only registered users may post in this forum.

Click here to login