I have ASIC IC is provide Raw data in Fixed-point format Q24 (24bit)
I need to convert to decimal by
Actual value = raw_data*LSB
LSB = 150/[( (2^24) - 1 )*0.6 ] = 150/10066329 = 1.49011E-5.
Range raw data is 0 ~ 10066329
I want to calculate Actual value in to uint 32bit and keep the precision in 2 or 3 decimal point.
for example If full scale raw data will be 10066329 and I wan to convert to Actual value , for 2 decimal point >> 15000 or for 3 decimal point >> 150000
I found the way to do this is
- Scale factor << but need to reduce the raw data precision for prevent data not over flow in 32 bit
- floating point << make MCU no efficiency
What the way I should select? Any one please suggest me.