DUE as i2c slave: i2c connx to a master don't work - for the Mega code works fine #3885
Labels
Board: Arduino Due
Applies only to the Due
Library: Wire
The Wire Arduino library
Type: Duplicate
Another item already exists for this topic
Milestone
I am running my DUE as an i2c slave to communicate to a i2c master (bitbanged i2c, it's a EV3):
the Due data transmission to the EV3 master don't work - to my Uno and Mega my code works fine nevertheless.
The code establishes a communication protocol to exchange data packages (arrays) between Arduino and EV3.
There are (at least) 2 possible error sources:
(1)
For the Mega I compellingly had to disable the internal pullups (patch in twi.c - for the Uno this was not necessary as there aren't internal pullups at all).
These pullup resistance is unusual for Arduinos but indispensable to make the EV3 master work with external devices.
for the DUE I dont know if the patch works too, because twi.c is located in an avr subdir
As for external pullups, 2x 47k have to be used (actually 30k-80k are fine, tested by Uno and Mega),
(2)
there were issue reports about the i2c implementation on the DUE:
http://forum.arduino.cc/index.php?topic=348787.msg2415061#msg2415061
98d0a72
I tried both the old version coming with the 1.6.5 release and the patch copied to the Wire subdir.
Again I don't know neither if it affects the DUE as the Wire subdir again is in a avr subdir, nor if the patch generally is suited to fix the error in principle.
For the DUE I both tested Pullups to 3.3V and to 5V to play it safe. At both levels it didn't work
Anyway, as the code works with Uno and Mega the issue is supposed to be located on the DUE side.
First my question about (1):
are there internal pullups on the Due, and if they are: how to disable them?
Next question about (2), Wire.cpp for ARM:
are there known issues about ARM/DUE as an i2c slave and how to fix them?
transmission source code (containing some irrelevant relicts from a former UART protocol):
The text was updated successfully, but these errors were encountered: