Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 6 months ago.
ADXL345 and LPC1768. Need help
Team
I am have been trying to get ADXL345 working with SPI and it yields only 0s. Even the whoamI isnt working.
Have tried following the instructions as per below website. Have also just copied the code. Still only 0s
https://developer.mbed.org/media/uploads/robt/mbed_course_notes_-_serial_spi.pdf
Also tried with Aaron Berk's modules. Still only 0s
Tried with Peter Swanson's I2C and it returns values percectly.
At this juncture, I have to use to SPI and cant move to I2C due to pin restrictions. I have a NAND memeory unit that also reads only SPI so I am "tagging" alon with this.
Note: I am testing wtih a dev board of ADXL345 and Mbed lpc1768. Havent moved to my circuit yet
This is the board I am using.
Have also swapped MOSI MISO. I either gets 0s or a very high number (when swapped)
Any help please
Best Reagrds Siva S
1 Answer
9 years, 6 months ago.
Hi Siva,
Recently I had silmilar problem. ADXL345 working fine in I2C but not in SPI. I got all zeros or -1,-1,-1.
After two week struggle, I changed the breakout board and it worked fine in SPI also.
I can't say you exact reason but this may work.
The problem was with blue color breakout board .
The sparkfun (red) breakout board worked for me.
May be try.