Tap sensing with BMA180 accelerometer

Thread Starter

kender

Joined Jan 17, 2007
264
Folks,

Could anyone post a code snippet, which would show how to initialize BMA180 accelerometer for tap sensing? Doesn't matter whether it's SPI or I2C.

So far, I was able to communicate with my BMA180 via SPI. I can read chip ID, accelerations. I can set up a new data interrupt.

When I try to set up the tap sensing interrupt, but the INT pin goes high without tapping and stays high. I've added code, which resets the interrupt every second, but the pin immediately goes back high. I guess, somehow the BMA180 thinks that it's tapped all the time.

Here are my present settings:
  • interrupt is latching
    range: 2g (default)
    tap duration: 500ms
    tap threshold: 254

Any suggestion, insight or reference is really appreciated!

Cheers,
- Nick
 
Top