Hi,
I have the ADXL345 in a custom design and I'm settting it up so that the ACTIVITY only will interrupt my processor. It's really a very simple application in which I need to detect a 2g event in any axis and to have it interrupt my processor. I think I just need to enable the ACTIVITY threshold only and enable only that interrupt which the interrupt is working.
My code snippet is below. I'm programming for 16g (not in the snippet but else where in my code), setting the threshold at 8 (0.5g) and enabling all 3 axis in DC mode. I think that is all I really have to do.
The problem is that if I set the THRESH_ACT to 8 (62.5mg/bit or 0.5g) the interrupt sits high even without touching the board. When I set the register to 254 (close to 16g’s!!), the interrupt is low but I can simply tap the board and the interrupt goes off. Much less sensitive but it’s NOT 16g’s. What am I doing wrong?
I don't think I would need to calibrate or maybe I should use AC mode?
Also, I'm assuming register 0x22 is for TAP only, is that correct?
Thanks so much!
John