From: Nurkkala Eero.An (EXT-Offcode/Oulu) Sent: 19 February, 2010 14:58
I'm a bit confused. What do you mean by that?
AFAICS, Q1.14 defines values [-16384.0, +16383.5], which are
mapped in the
driver to integers [-32768, 32767], right? Moreover, those
Q1.14 values in
registers are mapped to [-2, 2] in HW. So is there a problem
somewhere?
Cheers, Ilkka
No, don't get me wrong, not saying there's a problem with the positive gains, Q1.14: its range is [-16384.0, +16383.5] = [0x8000, 0x8001 … 0xFFFF, 0x0000, 0x0001 … 0x7FFE, 0x7FFF] if I read this correctly, your min is 0xFFFF, but the real min maybe 0x8000? To be honest, it may be just me interpreting that incorrectly.. ...as if the value is in two's complement, it goes the opposite: http://en.wikipedia.org/wiki/Two%27s_complement , see: 1 0 0 0 0 0 0 0 = −128 1 1 1 1 1 1 1 1 = −1 what do you think? maybe try it out to see the truth..
Oops, I seemed to copy Q1.14 instead of Q14.1, but isn't it still the same. When I added some debug messages it still seemed to be corret.
Lowest number (-32768) is represented with 16th bit '1' and the rest are zeros, right? That is 0x8000. -1 has all the bits set (0xffff) and 0 has all the bit cleared (0x0000). Highest positive value has 16th bit cleared and the rest set (0x7fff).
Or did I interpret something wrong?
Cheers, Ilkka