Hello, I had placed this post on the Due group; but wonder if it is better to place it in this group?
I am using a arduino due to communicate with a MAX7310 and LTC2657. The purpose is to allow multiple boards selected by the expander; the board currently connected by the I2C has 32 analog outputs providing a 0 to 10v signal, it can also read 32 analog inputs but I have chopped this out of the code attached to keep it simple!
It is connected on SDA and SCL on the arduino due.
The code attached can run for a few minutes or sometimes hours; but the I2C will stop but the program will keep running.
I have purchased a scope to monitor the signals; but I am now way out of my depth ..
Any help would be appreciated; I have now struggled to understand this for several weeks myself!
When the I2C stops up I can see that the SCL lines are 3V3 on both the arduino and analog PCB; the analog has 3v3 on the sda line.. but the arduino sda is 0v0.
I have tested this on a mega; with the same problems ...
If I run on the due SDA1 and SCL1 I get the same problems?
Please provide a wiring diagram. If you connect the setup correctly you cannot have different voltage levels on the two boards. Maybe I didn't understand you correctly, but the wiring diagram should solve that.
On then have GND wire from this PCB to the GND on the Arduino, likewise the SDA is connected to the SDA on both boards as is the SCL.
The program will run and I can set voltages on my PCB outputs ... however, the I2C randomly stops and I cannot see any reason for the random issues ...
I did attach a simple sketch of a very basic program that I am using for anyone to help and point if I am doing something wrong ...
I am out of my own options now and hoping someone can point in the right direction to why this is happening!
You're supplying 24V to the MAX7310 and the LTC2657? Again: please post your schemata.
If I run on the due SDA1 and SCL1 I get the same problems?
Is that a question or did you really try that? If yes, did you use pull-ups (the Due has them only on SCA0/SCL0)?
When the I2C stops up I can see that the SCL lines are 3V3 on both the arduino and analog PCB; the analog has 3v3 on the sda line.. but the arduino sda is 0v0.
Please describe that in more detail. You wrote that you connected the SDA lines of both the Arduino and the PCB. If they are connected how can they have different voltages?
The code attached can run for a few minutes or sometimes hours; but the I2C will stop but the program will keep running.
Please describe how you detect that. What are the symptoms?