大家好
我在设置LIS3DH模块以检测移动时遇到问题。
更确切地说,我希望设备在经历32毫秒加速度变化0.5秒时将INT1引脚设置为向下。
这是我的设置:
CTRL_REG1 = 0x20 // 10Hz,正常功耗模式,ZXY使能
CTRL_REG2 = 0x00 //没有HP过滤器
CTRL_REG3 = 0x40 // IA1启用
CTRL_REG4 = 0x10 //缩放4g
CTRL_REG5 = 0x08 //中断1引脚锁存
INT1_THS = 0x01 // 32mg阈值
INT1_DURA
tiON = 0x05 // 0.5s激活中断
INT1_CFG = 0x7F //启用6D方向模式,启用所有方向
现在,当我读取INT1_SRC寄存器时,它总是显示0x00,INT1引脚永远不会发生故障......
有趣的是,当我设置
INT1_THS至少为0x0A它可以工作,但对我来说太过分了!
soemone可以帮我解决这个案子吗?
以上来自于谷歌翻译
以下为原文
Hello all
I have a problem with setting LIS3DH module to detect movement.
To be more precise, I want the device to set the INT1 pin down when the it experiences 32mg acceleration change for 0.5 second.
Here are my settings:
CTRL_REG1 = 0x20 //10Hz, normal power mode, ZXY enable
CTRL_REG2 = 0x00 //no HP filters
CTRL_REG3 = 0x40 //IA1 enable
CTRL_REG4 = 0x10 //scale 4g
CTRL_REG5 = 0x08 //interrupt 1 pin latched
INT1_THS = 0x01 //32mg threshold
INT1_DURATION = 0x05 // 0.5s to activate interrupt
INT1_CFG = 0x7F //6D direction mode enabled, all directions enabled
Now, when I read INT1_SRC register it always shows 0x00 and INT1 pin never goes down...
Funny thing is that when I set
INT1_THS to at least 0x0A it works but it is too much for me!
Could soemone help me with this case?