Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   accelerometer adxl345 isnt working (http://www.chiefdelphi.com/forums/showthread.php?t=100975)

rai337 23-01-2012 16:52

accelerometer adxl345 isnt working
 
we tryed to make it work for 5 days, with no success, all the connections are fine, and we use then new code example but when we run it, it said 0 only.
we checked and it stuck in an endless while loop in:
adxl345 SPI open -> SPI read -> a while loop that stop when:
"SPI read #convd(i think)" isnt equal to 0 - and it send 0 only..
if anyone know what exectly is the problem, please help us.

adf0221 23-01-2012 18:53

Re: accelerometer adxl345 isnt working
 
Which cord are you using to connect your c-rio to your digital sidecar? We had this same issue and fixed it by connecting the new ribbon cable instead of the cable from past years.
Hope this helps!

rai337 24-01-2012 06:49

Re: accelerometer adxl345 isnt working
 
we tryed the both of them, and none of them work..

petet4 24-01-2012 13:22

Re: accelerometer adxl345 isnt working
 
Try using the address 0XA6, the sensor documatation indcates that the default address is 0x3A and 0xA6 when shorting J1. I belive the documentation is in error.

Once the address was changed to 0xA6 I2C communications worked. Also confirmed this by ohming the alt addrss per the Analog devices data sheet.

-pete

rai337 25-01-2012 08:23

Re: accelerometer adxl345 isnt working
 
the address change will work for I2C only or to SPI too?


All times are GMT -5. The time now is 15:27.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi