View Single Post
  #2   Spotlight this post!  
Unread 01-15-2010, 12:33 PM
bcieslak
 
Posts: n/a
Re: Help with 2010 Accelerometer & I2C

I am working on the same project with my team and play to modify the compass code to get me started. I am hoping the I2C code is good so I can concentrate on the accelerometer.

At first glance of the data sheet for the adxl345 it appears we will need to add more code that just the read of one register. Data is in 3 different registers at addresses 0x32 to 0x37 in a two's complement format so I would guess that returning a float from the read is the wrong choice. The compass may return a float but not the accelerometer. (this is what if get from the data sheet anyway).

We will probably have to trigger a sampling of some sort before the read.

I am not sure how the chip select is getting set or what the address is on the acclerometer. I'll start by assuming the chip is always selected and the address is zero (0).

As far as your code goes the only address I recognized is the power control register, not sure where you got the other ones. there not on my data sheet.


I'll keep you posted on what I find this weekend. And look forward to what others have to say.

Brian
Reply With Quote