Question
LIS2DE12 no interrupt and constant acceleration values
Posted on October 09, 2017 at 18:31
Hello,
Firs of all thank you for your time.I'm currently working with a LIS2DE12 for its great low power current but unfortunately I'm not able to get any useful information from the device. I tried to active an interrupt in the idea to check movement in any direction (i just want an interrupt if the device is moving). It doesn't work but worst when I read the register of the acceleration i have always the same values (exactly the same even when moving, reversed, ...). I guess I have made some mistakes in my configuration but I was not able to find where is the problem.Just below my pseudo-code. The I2C function are working correctly (I'm able to communcate with the
LIS2DE12 )
init:Check ACCEL_WHO_AM_I
write 0xC0 ACCEL_TEMP_CFG_REG // enable the measure of the temperaturewrite 0x57
CTRL_REG1 // 100Hz & activate all the axeswrite 0x00
CTRL_REG2 // No filterwrite 0x00
CTRL_REG3 // No specific interruptwrite 0x80
CTRL_REG4 // BDU activated for the temperaturewrite 0x08
CTRL_REG5 // Latch interruptwrite 0x00
CTRL_REG6 // no INTERRUPT on int2write 0b00101010
INT1_CFG // Interrupt OR when over thresholdwrite 0x16
INT1_THS // Set the thresholdwrite 0x03
INT1_DURATION // Set the duration (small one)write 0x00 FIFO_CTRL_REG // bypass modeloop:
check if data available ( read STATUS_REG_AUX) thenread ACCEL_OUT_X_H,ACCEL_OUT_Y_H,ACCEL_OUT_Z_H
check if INT1 == 1 then
LED = 1 // to be able to see the interruptionI hope that I respected the rules of this forum.kind regards,Denis