Quantcast
Channel: EngineerZone: Message List
Viewing all articles
Browse latest Browse all 28044

Re: ADXL345 activity & inactivity issue - detection on all axes not working

$
0
0

Hi Mateusz,

 

How many pcs ADXL345 you have tested with the code, are they perform the same?

To debug the activity and inactivity issue that you descibed, you can use the recommended code as shown below:

1. write 0x0B to register 0x31 (DATA_FORMAT)     //choose full resolution mode, 3.9mg/LSB

2. write 0x0B to register 0x2C (BW_RATE)            //set ODR to 200Hz as you did

3. write 0x04 to reigster 0x24 (THRESH_ACT)        //set activity threshold as you mentioned

4. write 0x02 to reigster 0x25 (THRESH_INACT)     //set inactivity threshold as you mentioned

5. write 0x02 to reigster 0x26 (TIME_INACT)          //set inactivity time as you mentioned

6. write 0xff to register 0x27 (ACT_INACT_CTL)     //enable X, Y, Z in AC mode

7. write 0x18 to register 0x2E (INT_ENABLE)         //enable Activity and inactivity interrupt.

8. configure the 0x2F (INT_MAP) register according to your schematics.

9. write 0x38/0x28/0x08 to regiser 0x2D (POWER_CTL)     //enable measurment.

 

Hope these can help.

 

BR

Neil


Viewing all articles
Browse latest Browse all 28044

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>