Where do I have to replace the code?
There seems to be no file on my HD, that contains the faulty code.
I'm not that good with Arduino.
Can you give me some additional informations about the cause of the error and wehere it is located?
I understand "address cannot be > 127" but I don't know why the code works on my Arduino Mega but refuses to work on my DUE. :~
...I2C addresses > 127 are not valid. Which means the assertion is correct and the problem is very likely in your sketch.
I just double checked my sketch. It works perfectly on the Mega 265 board.
The only device using I2C is a two-wire LCD display.
To print a message i use this code:
In other words, I don't have to bodder with adressing.
I just send the text I want to print via the library to the display.
After digging through the tutorials (thank you, great stuff ), I have a wild hunch where the problem may come from.
The library is written for a 16mHz and not for a 82Mhz chip:
** // overclcking I2C**
** #define CPU_FREQ 16000000L // (...) - a discuter, car fonction vitesse clock cpu**
** #define TWI_FREQ_MCP23008 400000L**
Do i have to replace those Lines with the new clock speed?
** // overclcking I2C**
** #define CPU_FREQ 82000000L // (...) - a discuter, car fonction vitesse clock cpu**
** #define TWI_FREQ_MCP23008 400000L** <--- do i need to modify this line too?
The Due/SAM3X takes the TWI address in 7 bit format with out the lower b0 R/W. ie range 0-127. and that is used to write the hardware address register.
A lot of TWI address are quoted in 8bit format with the lower R/W bit added and then it is written it to the hardware address register.
This particular syntax got me stymied for a few days when an NXP data sheet was quoting the address in 8 bit "hex" format and Ididn't realize it.
I know that it's been a while ... but has anyone got a better handle on the cause and resolution of this issue?
I've run into the same thing. On a DUE accessing ADS1115 via I2C and the WIRE library. I've already verified that the address that I am passing the ADS1115 lib is correct but I have not yet verified the address that it is passing to wire, etc. However, the above appears to lean towards a cpu frequency issue.
The odd thing is that this program has worked fine for quite a while running for days at a time and now it does the same thing for about 15 minutes and then...crashes as above.
Not sure if this is related but...checking to see if I have the correct version of Wire library and saw someone say that it was supposed to be in hardware/arduino/sam/libraries/Wire...but I don't have sam. Running 1.6.5 Arduino IDE and 1.6.4 DUE board version. ...but no sam...so I remove and reinstall the DUE board and still no sam.