AnsweredAssumed Answered

MAG 3110 ctrl_reg2 reading issue.

Question asked by Nicolas DECROZE on Jan 19, 2016
Latest reply on Mar 9, 2016 by Nicolas DECROZE

Hello,

 

I try to use MAG3110 sensor with an arduino due board.

I have a problem when i want to write in the "Ctrl_reg2" register.

I want to write 0x80 in the register but when i read it (just to verify), the register value is 0x00...

 

I haven't this issue with ctrl_reg1.

 

Here ou can see the writing code :

 

       Wire.beginTransmission(MAG_ADDR);   // transmit to device 0x0E

       Wire.write(0x10);                   // ctrl register1

       Wire.write(0x00);                   // Standby

       Wire.endTransmission();             // stop transmitting

 

       delay(15);

 

       Wire.beginTransmission(MAG_ADDR);   // transmit to device 0x0E

       Wire.write(0x11);                   // ctrl register2

       Wire.write(0x80);                  // send 0x80, enable auto resets

       Wire.endTransmission();             // stop transmitting

 

Is there any special things to do with this register ?

 

Many thanks for the help.

Outcomes