ADXL345 Debugging Help

09 Nov 2010

Hi,

I am a new user to the mbed and microcontroller in general, but have a project using an ADXL345 accelerometer, but having troubles debugging the component because I am getting no output from the "Cookbook" code. I am using a MAC OSX and am curious if the pc.printf("....") is suppose to show up on the screen once I run reset the mbed with the new bin file. I have it connected using SPI with data sheet connections but have not had any luck with any output. I wanted to see how it measures so I could utilize conditional statements for my project.

 

Thanks

Henry

11 Nov 2010

As an update, I have the communication port from my computer to the mbed working, Now I'm getting the accelerometer output coming in -1's, so the output reads: "-1, -1, -1 [return] -1, -1, -1..." could my accelerometer by shorted or malfunctioning?

 

Thanks

Henry

11 Nov 2010

Hi Henry,

Check your connections. Make sure that you are powering it using 3.3V (and not 5V). I think the datasheet has different names for the pins than the cookbook. Are you using the sparkfun breakout board? This is how I've used it:

ADXL345     BoB       mbed
 SDI    =   SDA  --->  p5
 SDO    =   SDO  --->  p6
 SCLK   =   SCL  --->  p7
 /CS    =   CS   --->  p8

 

12 Nov 2010

I think what happened was that i had the accelerometer power supply and the motor power mixed up, this may have caused the accelerometer to go bad. I also checked the connection pins that you've had as well Igor, and am using the sparkfun breakout board. Thanks for your help.

HEnry