AnsweredAssumed Answered

ADXL345 - SPI  Read multiple bytes

Question asked by v-moreaux@. on Apr 29, 2013
Latest reply on May 1, 2013 by neilzhao

Hello,

 

I have a problem to read the data from my ADXL345. I use it with a PIC32 and they communicate with SPI at 400kHz (4 wire). I am in ±2g range so i expect to have a data value between -256 and 256 except that I have big values like 3000,4000 or 35000... (I can read the right device ID 0xE5). So I have already a problem with that.

 

Then I want to read multiple bytes (X0, X1, Y0, Y1, Z0 and Z1). I read the datasheet and I set the bit A7 to read and A6 to read multiple bytes. My problem is between 2 bytes. I don't understand how I have to do between 2 data bytes (Y0 and Y1 for example).

 

My last problem is DATA_X0. I always read 0x08 with this data registers and I don't know why.

 

Thank you for your help !

Outcomes