Hi,
I know i'm in a minority here, but I've purchased a HMC5883L Magnetometer from DIY Drones and I've been programming a DSPic to read the values through I2C. I have the device in continuous mode, however each time I loop around to re-read the values, the values/ seems to shift up a register. I.e.
I read everything correctly the first time round, the second read though XH value is displaying XL value and the third time round the XH is now reading the YH value etc etc.
Has anyone got any ideas, I'm assuming I am missing something in my code?
Replies
Else if (address pointer >= 12) then address pointer = 0
Else (address pointer) = (address pointer) + 1
Else if (address pointer >= 12) then address pointer = 0