AnsweredAssumed Answered

How to enable interrupt pin for motion detect of MMA8452

Question asked by ryan wen on Apr 8, 2018
Latest reply on Apr 10, 2018 by Tomas Vaverka

How to enable interrupt pin for motion detect of MMA8452?

 

my (initial interrupt) code for mma8452 following ,

it doesn't work .....

 

WriteByte(MMA8451, 0x15 , 0x78);// MT Configure , 78 or f8
WriteByte(MMA8451, 0x17 , 0x30);// Moction Threshold , 0x30
WriteByte(MMA8451, 0x18 , 0x30);// Debounce Count
WriteByte(MMA8451, 0x2a , 0x18);// Ctrl_reg1
WriteByte(MMA8451, 0x2b , 0x00);// Ctrl_reg2 ,ALPE
WriteByte(MMA8451, 0x2d , 0x04);// Enable Int function FF_MT , 04
WriteByte(MMA8451, 0x2e , 0x04);// Int enable : MT by int1:1 or int2:0
WriteByte(MMA8451, 0x2C , 0x0A);// Sleep bypass , int active low , pushpull

Outcomes