I am trying to interface the MMA8653FCR1 via I2C. I have to configure the MMA to detect motion interrupts and give out a pulse on INT1. The pseudo code for the same is as follows
1) CTRL_REG1 = 0x00 // Put MMA in standby mode
2) INT_SOURCE = 0x04 // Activate Motion Interrupt
3) XYZ_DATA_CFG = 0x00 // 2g Mode
4) FF_MT_CFG = 0xf8 // Motion on all three axis
5) FF_MT_THS = 0x1f //Motion Threshold
6) CTRL_REG3 = 0x0a // Active High and Motion can Wake-up Controller
7) CTRL_REG4 = 0x04 //Enable Motion Interrupts
8) CTRL_REG5 = 0x02 // Interrupts on INT1
9) CTRL_REG1 = 0x01 // MMA Active.
I have tried the above code, the I2C library for my controller is working perfectly fine. The MMA however is unresponsive.
Could someone provide me with a link or sample code which can help.