Skip to main content
Visitor II
November 12, 2017
Solved

LIS2DE12 Accelerometer I2C data Reading Problem

  • November 12, 2017
  • 1 reply
  • 1070 views
Posted on November 12, 2017 at 08:35

Hi, I'm working with LIS2DE12 for motion detection. I have configured INT1. Whenever motion is detected I'm reading  INT1_SRC but its value is not changing. It is always same 01101000. Here's the configurations I have set.

CNTRL_REG0 = 10h    //SDO pull_up connected

CNTRL_REG1 = 3Fh   //25Hz, Enable XYZ axes

CNTRL_REG2= 03h    //HPF enabled for Interrupt

CNTRL_REG3= 40h    //INT1 on INT1 pin

CNTRL_REG4 =00h    //Default BDU disabled

CNTRL_REG5= 04h     //4D enabled

CNTRL_REG6= 20h    // INT2 Interrupt on INT2 pin /clk INT2 & activity INT DISABLED..

INT1_CFG       = 7Fh    //X,Y,Z interrupts , 6-D enabled

INT1_THS       = 05h 

INT1_DUR      = 03h      //  (03/25) seconds.

Also OUT_X_H, OUT_Y_H, and OUT_Z_H gives always same values. Anything I'm missing in the configuration? help me out of this.

#accelerometer
    This topic has been closed for replies.
    Best answer by udhakumar udhayakumar
    Posted on November 14, 2017 at 18:18

    I got it working by setting FIFO register settings correctly. But in datasheet it is told to read acceleration data with starting address 28h.. But with that address if read 6-bytes upto 2Dh it is giving always zeros.. If the starting address for acc_data reading is given as (08h | 28h) instead of 28h acc_data values are reading correctly. Then I'm able to read x,y,z acc_data ..Why it is like that.?

    1 reply

    Visitor II
    November 14, 2017
    Posted on November 14, 2017 at 18:18

    I got it working by setting FIFO register settings correctly. But in datasheet it is told to read acceleration data with starting address 28h.. But with that address if read 6-bytes upto 2Dh it is giving always zeros.. If the starting address for acc_data reading is given as (08h | 28h) instead of 28h acc_data values are reading correctly. Then I'm able to read x,y,z acc_data ..Why it is like that.?