AnsweredAssumed Answered

L3G4200D giving constant values for x, y and z.

Question asked by hering.eduardo on Mar 9, 2016
Latest reply on Mar 10, 2016 by hering.eduardo
Hi. 

I have connected an L3G4200D to an ATMEGA328P via SPI.

WHO_AM_I gives me 211d, or 0xD3, which is the expected value.

The values I use for control registers are:
CTRL_REG1: 0b00001111
CTRL_REG2: 0x80
CTRL_REG3: 0x00
CTRL_REG4: 0b10000000, but also tried with 0x00
CTRL_REG5: 0x00

My SPI parameters are:
MSBFIRST, MODE3, CLOCK_DIV8

Every time I power up the system, I get constant values coming out of X, Y and Z.
These values are random. When I power cycle, they change, but keep constant while power is on.

WhoAmI is consistently 211d.

Do you have any idea what is going on? I also have a LIS331 accelerometer attached to the same ATMega328P, which is functioning well.

I tried desoldering the gyro and desoldering it in place, but got no change in behaviour.

Can somebody please help?

Outcomes