Skip to main content
Visitor II
August 12, 2015
Question

L3G4200 SPI unstable read value

  • August 12, 2015
  • 1 reply
  • 770 views
Posted on August 12, 2015 at 22:51

Hello

I'm trying to use the L3G4200D Gyroscope to measure the pitch in 3 dimention.But I faced a problem with:

I used the Keil's examples.Iuse SPI to read and write on the device...I can read some registers such as WHO_AM _I  etc. I also used these control register configuration:

Gyroscope_Write(CTRL_REG1, 0x0F);     /* ODR: 100Hz, Cut-Off: 12.5,         */

Gyroscope_Write(CTRL_REG4, 0x00);     /* Continuous update,full scale 250dps*/

Gyroscope_Write(CTRL_REG5, 0x40);     /* FIFO Enable                        */

But I can't read state registers(X, Y, Z).My problem is that the result read from the gyroscope is not stable at all where it is not moving in any direction!!!

Please help me to solve the problem and it would be great if you can provide me some working code examples.

Thank you for your attention,

Borzoo Khoshnoud.
    This topic has been closed for replies.

    1 reply

    Visitor II
    July 14, 2016
    Posted on July 14, 2016 at 17:17

    Hello,

    You have to set BDU bit in CTRL_REG4 register and read axis data LSB first.

    BR,

    Marian