Hi, I have been working with MMA8652FC for quite some time. Initially I wanted to get an interrupt when there is a single tap on all axes and I also got it. Now I need to get an single tap interrupt only when there is a single tap on positive Z-axis. So I tried with these configuration settings as I found in one example code. Is there any example code for setting up this configuration? Thanks
Hello Anthony,
Thank you for writing.
You may use the document below as a reference for your application.
https://community.nxp.com/docs/DOC-329888
Once the PULSE interrupt is generated, I recommend to evaluate the PULSE_SRC register in order to know what was the exact axis and the direction that triggered the interrupt. Once you know the exact source of the interrupt, you may proceed with your code or not.
So, if you read 0xC0 from the PULSE_SRC register, you will know that the positive Z-axis triggered the interrupt.
Please let me know if my suggestion is clear.
Regards,
David