I’m also using the LSM303DLH, it’s being controlled by a PIC18F46K22 on 3v.
The accelero is working perfectly but it seems like the magneto is not updating it’s axes. I thought the problem was the continues mode or not reading all 6bytes in the same i2c transmission. But I does not seem to work whatever i do.
Hello,
Thanks for your help.
I using OR-AVR-M128-S controller and OR-USB-UART for my robots (in Russian). Programming language - jscript + hta.
I solved the problem. The problem in low voltage ~ 1,6v. Voltage 4,5v solve the problem.
Thank you.
TeHuster i think problem in line:
i2c_writeData(OUT_X_H_M||0b10000000); // OUT_X_H_M with MSb 1 for stream
try:
i2c_writeData(0x03); // the register is autoincremented after each read
Page 26 documentation (Magnetic signal interface reading/writing):
To minimize the communication between the master and magnetic digital interface of the
LSM303DLH, the address pointer is updated automatically without master intervention.