Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- I have now working sample. (Actually during the process of debugging, I also ended up coding up the I2C version as well). At any rate, I have some VHDL that strictly uses SPI-3 wire mode to configure the ADXL345 and is able to configure any register and read back the results. I'm not sure if it is strictly necessary, but I did have to be careful to encode the SPI communication to make sure it does not initiate any I2C start/stop frame. My test program sets the range to smallest range then reads the result back continuously on the z-axis and shows the results on the 8 LED. It flashes left half for negative G and right for positive. Obviously, I have scaled the 16-bit result down to 4-bits in the process. You can contact me if you need more info, not sure if I should post full code here. --- Quote End --- Hi Issac I am working with accelerometer FPGA DE0-Nano and searching help the VHDL. As do contact you? How see your code? Thank you Nouara Would