If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

# bq27501 datasheet quote "Not IEEE floating point"

Other Parts Discussed in Thread: BQ27501

Can anyone please tell me how to convert the 4-byte values in the bq27501's dataflash from the hex representation to a floating point number?

The datasheet goes out of it's way to state that the TI format is non-standard, but doesn't describe it any further.

How can I convert the 4-byte values at subclass 104 offset 0 (CC Gain) and 4 (CC Delta) to a floating point number?

Thanks!

• Hi Dave,

Does this post help?

http://e2e.ti.com/support/power_management/battery_management/f/180/p/53473/214273.aspx#214273

• Hi dMax.

It looks like it might.  I'll see if I can decipher the instructions and try them out on the values in my dataflash and let you know if it works.

I noticed that the tags associated with that post didn't match what I was using to search the forum with, but they gave me an idea of how to broaden my forum searches in the future.  So, hopefully I won't have to post questions that have already been answered.

Thanks,
Dave

• dMax,

The math worked out okay for me, but I have a couple of follow up questions.

1. When computing the exp gain, the examples show taking the most significant byte and subtracting 128 and 24 from that, to get what power to raise 2 to, to then use as a multiplier.  Where did the subtracting of 128 and 24 come from?
2. Is the value of 4.768 used in the CC gain calculations a constant?
3. Is the value of 5677445 used in the CC Delta calculations a constant?
4. Is the value of 0.48/16 a used in the Board Offset calculations a constant?
5. Is the value of 0.00048 used in the CC Offset calculations a constant?

Thanks,
Dave