2016-06-05 06:14 PM
I'm using IIS2DH, I config it to normal mode, so It's 10bit resolution, and I got 16bit data for each axis, now I right shift the 16bit data to get a 10bit data, and the range is 0-1023, is that right?
but And if I keep the board horizontal, I got the Z = 125*7.81mg/digit= 1g, it's right, but if I reverse the board, the ideal Z should be -g, right? But I got the data which is 905, so Z = 905*7.81mg/digit = 7g, it's not right, I can't find details about how to convert data to g in the website, who can help me ? #data-convert #g #iis2dh2016-06-30 01:02 AM
Hello,
your data are correct but the decoding is not. The data are stored as Two's complement. Please refer to:https://en.wikipedia.org/wiki/Two%27s_complement
orhttp://stackoverflow.com/questions/1049722/what-is-2s-complement
Best regardsMiroslav