Answer the question
In order to leave comments, you need to log in
Question about floating point numbers
When implementing an interface to one piece of hardware ( bq20z95 ), I came across an incomprehensible floating-point number format. IEEE 754 is not suitable.
There are 2 examples:
1. the sequence {0x93, 0x09, 0x2c, 0x94} should be decoded as 280932.6,
2. the sequence {0x80, 0x71, 0x20, 0x5b} should be decoded as 0.9419.
Maybe someone has come across something similar?
Answer the question
In order to leave comments, you need to log in
It looks like TI has its own floating-point format ( pdf , page 14) and it decodes your examples correctly.
Judging by the datasheet, those two examples that you give are a comparison of default values from the document and data read from a real piece of iron. But since these are calibration data, they can easily differ from the default values if the piece of iron did not come to you directly from the assembly line (and even then ...). And what do the values given to you correspond to when using the standard format (float)? Check if they are within the given range of values. Well, you can also swap bytes on the topic of junior / senior ahead.
Someone ivkey (with an address on yandex.ru) wrote to me by mail:
Hello, I am writing about the question on Habré "Question about floating point numbers." DmitriyN did not find contacts, so I am writing to you, please pass it on to him.
Here is a link to an example of calculating values:
e2e.ti.com/support/power_management/battery_management/f/180/p/53473/214273.aspx#214273
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question