2019-03-20 08:06 AM
How does one convert:
Thanks :grinning_face:
Solved! Go to Solution.
2019-03-21 03:34 AM
you're welcome timothy, you can get temperature value in a similar way: read the OUT_TEMP (26h) reg value (e.g. 15h), transform in decimal value through two's complement (e.g. decimal 21) and apply the -1 LSB/°C conversion factor, obtaining -21°C
Regards
Eleon
2019-03-20 09:42 AM
hi timothy,
regards
2019-03-20 11:14 AM
Okay, so you mean, for example, that if my full scale is 500, I just take the concatenated 16 bit value and multiply by 500?
2019-03-21 01:50 AM
Suppose you get value E2h on OUT_X_L (28h) register and value 55h on OUT_X_H (29h). You concatenate 55h and E2h obtaining 55E2h, then you apply two's complement conversion obtaining decimal 21986 and finally you multiply it for 17.50 mdps (= 0.0175 dps) obtaining 384.755 dps, if your FS is 500dps.
Regards
2019-03-21 02:00 AM
Got it! Thanks so much.
Could you also give a similar example with temperature conversion?
Regards,
Timothy
2019-03-21 03:34 AM
you're welcome timothy, you can get temperature value in a similar way: read the OUT_TEMP (26h) reg value (e.g. 15h), transform in decimal value through two's complement (e.g. decimal 21) and apply the -1 LSB/°C conversion factor, obtaining -21°C
Regards
Eleon
2019-03-21 03:38 AM
You rock! Thanks! It works!