cancel
Showing results for 
Search instead for 
Did you mean: 

configure LIS3DSH for different ranges

zoharr
Associate II
Posted on March 20, 2014 at 15:26

Hello,

I'm trying to work with LIS3DSH device with different ranges.

I put the device on a table facing up, so Z axis should give me 1000mg reading, for all ranges.

I configure the device to range 2g by writing to reg_5 0x00

The raw value I got was 0x3ffe.

The sensitivity for this range is 0.06mg/digit according to spec,

So calculation is: 0x3ffe * 0.06 = 982.92 mg , close enough to 1000mg.

I flipped the device to measure negative value.

The raw value I got was 0xc001. according to spec I calculated 2's compelemt:

0xc001 -> 2's complement -> 0x3fff

So calculation is: (-1) * 0x3fff * 0.06 = -982.98 mg , close enough to -1000mg.

Then I tried to change range to 4g by writing to reg_5 0x08 (flipped the device back).

The raw value I got was very similar to the previous one 0x4002.

The sensitivity for this range is 0.12mg/digit according to spec,

So calculation is: 0x4002 * 0.12 = 1996.32 mg, almost 2000mg, not 1000mg!

What am I doing wrong here?
0 REPLIES 0