AnsweredAssumed Answered

ADXL345 Basics understanding for newbie

Question asked by prakash2025 on Sep 17, 2015
Latest reply on Sep 18, 2015 by prakash2025

Hi all

 

i am using ADXL345 accelerometer. I am trying to evaluate the features available in the Acceleometer. I have few queries since i am newbie to this.

1. First i tried to read the output data registers value from register 0x32 as 6 bytes continuously after configuring the power ctl(0x2d)

   register in to measure mode and i can able to read the data. Also if i am trying to read the data from register 0x32 as 6 bytes          continuously  without configuring power ctl register into measure mode also i can get the same values, why is it so?

2. I have received the values from different direction and i mapped the received values against the X,Y,Z axis based on the MSB bit.

   Can any one confirm whether my mapping is correct?

AxisAssumption (received)Actual(based on MSB bit)
X+

X = 0xFF << 8 + 0x1A

Y = 0x00 <<  8 + 0x0E

Z = 0x00 << 8 + 0x00

X = 0x01 << 8 + 0x08

Y = 0x00 <<  8 + 0x08

Z = 0x00 << 8 + 0x19

X-

X = 0x01 << 8 + 0x08

Y = 0x00 <<  8 + 0x08

Z = 0x00 << 8 + 0x19

X = 0xFF << 8 + 0x1A

Y = 0x00 <<  8 + 0x0E

Z = 0x00 << 8 + 0x00

Y+

X = 0x0D << 8 + 0x00

Y = 0xFF <<  8 + 0xF4

Z = 0xFF << 8 + 0x20

X = 0x00 << 8 + 0x09

Y = 0x00 <<  8 + 0x0A

Z = 0xFF << 8 + 0x1D

Y-

X = 0xFF << 8 + 0x1A

Y = 0x00 <<  8 + 0x0E

Z = 0x00 << 8 + 0x00

X = 0x00 << 8 + 0x19

Y = 0xFF <<  8 + 0xFF

Z = 0x01 << 8 + 0x0C

Z+

X = 0x00 << 8 + 0x09

Y = 0x00 <<  8 + 0x0A

Z = 0xFF << 8 + 0x1D

X = 0xFF << 8 + 0x1A

Y = 0x00 <<  8 + 0x0E

Z = 0x00 << 8 + 0x00

Z-

X = 0x00 << 8 + 0x19

Y = 0xFF <<  8 + 0xFF

Z = 0x01 << 8 + 0x0C

X = 0x0D << 8 + 0x00

Y = 0xFF <<  8 + 0xF4

Z = 0xFF << 8 + 0x20

3. I have tried for single tap detection as follows

  set DUR register(0x21) to 0x10 (10ms)

  set TAP_AXES register(0x2A) to 0x07

  set THRESH_TAP register(0x1D) to 0x30

  set INT_ENABLE register (0x2E) to 0x40

  set POWER_CTL  register (0x2D) to 0x08

   but the tap detection interrupt bit is not set in INT_SOURCE (0x30) register. Could any one help me guide for solving this issue.

4. I have tried for activity and inactivity event as follows (after clearing whwtever the register i have set for tap detection)

   for that case also the corresponding  interrupt bit are not set.

  set ACT_INACT_CTL register(0x27) to 0x77

  set THRESH_ACT register(0x24) to 0x10

  set THRESH_INACT register(0x25) to 0x10

  set THRESH_INACT register(0x26) to 0x05

  set INT_ENABLE register (0x2E) to 0x18

  set POWER_CTL  register (0x2D) to 0x08

 

Thanks in advance

Outcomes