Hi everyone, I have been working with MMA8652 for quite sometime now. I need to determine the tap direction specially in the z-axis. I have been following this example here: MMA8451Q -Single Tap Detection Bare metal example project. When I tap on top of the board (z-axis), it will always give me a value of C0 or C4 at Reg( 0x22). It will also gave me the same value when I tap at the bottom part. Thus, it is confusing if the hit comes from the top or bottom.
Since the example and application notes is using MMA8451. I compared it to MMA8652. I noticed that in MMA8451, REG0x2A has LNOISE bit (bit 2) but it is reserved in MMA8652. Will this make a difference?
In the attached is our initialization set-up and tap function.I hope to hear a feedback on how to deal with this. Thanks!
Original Attachment has been moved to: MMA8652_Init-and-TAP-Function.txt.zip