- Sun Nov 15, 2009 8:50 pm
#85152
Could you please share your Arduino code? I am also having issues, and it would be good to be able to rule out my code as the problem. Thanks alot.
Where electronics enthusiasts find answers.
m1tch37 wrote:Could you please share your Arduino code? I am also having issues, and it would be good to be able to rule out my code as the problem. Thanks alot.I couldn't get Wire to work with it at all, so I wrote up a really basic library.
I2C1CONbits.SEN = 1; // start I2C
while (I2C1CONbits.SEN); // wait for start to complete
_MI2C1IF = 0; // clear IF
I2C1TRN = 0x3D; // read from HMC
while(!_MI2C1IF); // wait for 9th clock edge to end
_MI2C1IF = 0; // clear IF
I2C1CONbits.PEN = 1; // stop I2C
while (I2C1CONbits.PEN); // wait for stop to complete
kushlik wrote:What is the ESR of that electrolytic cap? Very low ESR is very important.
I have seen the comments regarding the cap - I have tried replacing it with 680uF electrolytic with no change. DVDD seems to be ok, though I will look at it on a better scope.