Hi all,
I need some help with a datasheet from an accelerometer i've bought.
This is it:http://www.kionix.com/Product-Specs/KXPS5-3157 Specifications Rev 1.pdf
I am using the analogue outputs as I have never used I2C or SPI and I reckon it would be best to start those on a project where there aren't as many other potential problems. However, I'm using a 28X2 so they are a possibility. I am using the attached schematic and program with the following connections:
X to A.2
Y to A.1
Z to A.0
Enable (pin 6) = B.5
MOT Enable (pin 12) = B.4
Unfortunately, when I debug, I just get the following values:
b0 = 217
b1 = 233
b2 = 233
All give or take about 1, but it bares no correlation to the tilt of the device.
On page 11 of the datasheet, it shows a table which suggests that it produces negative values as well as normal positive. Is this right and if so, how do I measure it.
Thanks in advance,
David.![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I need some help with a datasheet from an accelerometer i've bought.
This is it:http://www.kionix.com/Product-Specs/KXPS5-3157 Specifications Rev 1.pdf
I am using the analogue outputs as I have never used I2C or SPI and I reckon it would be best to start those on a project where there aren't as many other potential problems. However, I'm using a 28X2 so they are a possibility. I am using the attached schematic and program with the following connections:
X to A.2
Y to A.1
Z to A.0
Enable (pin 6) = B.5
MOT Enable (pin 12) = B.4
Unfortunately, when I debug, I just get the following values:
b0 = 217
b1 = 233
b2 = 233
All give or take about 1, but it bares no correlation to the tilt of the device.
On page 11 of the datasheet, it shows a table which suggests that it produces negative values as well as normal positive. Is this right and if so, how do I measure it.
Thanks in advance,
David.
Attachments
-
35.8 KB Views: 22
-
122 bytes Views: 2