2017-10-09 09:31 AM
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,Denis2017-10-13 08:58 AM
I would like to add that if you need to enable the BDU in CTRL_REG4 due to the temperature sensor, you have to perform a dummy read of register 0x28, 0x2A, 0x2C and discard these values. This must be done each time you want to read the accelerometer output values, otherwise the output values will not be updated.
2017-11-12 03:29 AM
Hi, I'm using LIS2DE12. I have tried the same configurations as you said above , But when Interrupt occurs I read INT1_SRC register it gives me a 00000000. After that interrupt is not detecting. And also I have tried by disabling that INT1 Latching by setting CNTRL_REG5 = 0x04;. Then interrupt is detecting always but INT1_SRC reg always giving zero's. What will be the problem. Any suggestions pls?