Question
L3G4200D giving constant values for x, y and z.
Posted on March 09, 2016 at 05:26
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: 0b00001111CTRL_REG2: 0x80CTRL_REG3: 0x00CTRL_REG4: 0b10000000, but also tried with 0x00CTRL_REG5: 0x00My SPI parameters are:MSBFIRST, MODE3, CLOCK_DIV8Every 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? #l3g4200d-constant-output-random