AnsweredAssumed Answered

Help with ADXL345

Question asked by amck77 on Nov 20, 2012
Latest reply on Nov 21, 2012 by amck77

Hi,

 

I have been trying to use the ADXL345 for over a month now and have had all sorts of issues. Most of them I managed to figure out apart from one. I can not seam to get any useable measurement data out of it. Could someone maybe talk me through some stuff as it could be something simple, but I am out of idea's completely now.

 

Currently I am reading the FIFO with SPI and I read 30 values. All of which are quite random and have lots of 0 values in between very large values which can't be right... The values that are 0, are constantly 0. I am reading the FIFO on the press of a button connect to the microcontroller so there is pleanty of time for it to fill and gives the 5uS delay required in between reads.

 

Once I have read each FIFO register, I join the two 8 bit numbers into 16 bits with:

 

tempx = (x1[i] << 8) | x0[i];

 

I then put this in to a version of printf for my microcontroller. Should I be doing anything else to if before I print it? Printf outputs the value it creates over a serial com port to RealTerm.

 

I have device bandwidth set to 25Hz, FIFO mode, and ±2g range. My SPI speed is 4 MHz and if necessary, I am using a TI MSP430G2553 microcontroller

 

Let me know if I have missed anything that might help.

 

Thanks,

Alex

Outcomes