How to use SPI with ADXL345 accelerometer and PSoC 5 board | Cypress Semiconductor
How to use SPI with ADXL345 accelerometer and PSoC 5 board
Hi everyone! I'm trying to get data out of a ADXL345 accelerometer and display it on the LCD of the PSoC5. I'm having difficulties trying to display the results. At this point, I'm only trying to get the x and y axis results, one for each line of the LCD. I'm currently a student at a university and have asked my professors if they have any idea how to use SPI, but none have been able to help with the PSoC related stuff. I've looked at other threads in this forum but none have really solved the problem and I've pretty much exhausted the internet searching for answers. I did find some code (AccelSPI_test.c) that I spliced and added into my code. It wasn't meant for the PSoC5 though, so I had to change some things. I think I only need an SPI Master in the top design, and not a slave. I've attached the main c file for anyone to look at with the AccelSPI_test.c file under it. If anyone can help or has any ideas how to do this it would be great. If you need more information, like TopDesign, or pin assignments, I can post this too, but I think those are ok right now.