electronicsman
Full Member level 5
I am bit confused with application note https://ww1.microchip.com/downloads/en/AppNotes/01017A.pdf
regarding the signed fraction format, I see in the document -1.0 6000 RPM Reverse and 0.99997 6000 RPM Forward, but -1 is 6000 RPM reverse then ideally +1 should be 6000 RPM Forward. Am i correct? I downloaded the source code it seems to be ok I mean 6000 Rpm reverse and Forward are matching.
But main questions are
1. How 0x7F97 is 0.996805 i tried hard to understand but not able to decode.
My analysis is something like this. I am assuming it is 16 bit and Q15 Format. 1 Integer and 15 Fractional bits
0x7F97
B15 is signed bit,
(2^-1) + (2^-2) + (2^-3)+
(2^-4)+(2^-5)+(2^-6)+(2^-7)+
(2^-8)+2(^-11)+
(2^-13)+(2^-14)+(2^-15) = 0.996795654 but it does not match with 0.996805.
2. The other related question why he should select 32663?
Please help.
regarding the signed fraction format, I see in the document -1.0 6000 RPM Reverse and 0.99997 6000 RPM Forward, but -1 is 6000 RPM reverse then ideally +1 should be 6000 RPM Forward. Am i correct? I downloaded the source code it seems to be ok I mean 6000 Rpm reverse and Forward are matching.
Code:
// CONDITION RPM SFRAC16 SINT HEX
// Max Speed CW -> 6000 RPM -> 0.996805 -> 32663 -> 0x7F97
// Min Speed CW -> 60 RPM -> 0.009984 -> 327 -> 0x0147
// Min Speed CCW -> -60 RPM -> -0.009984 -> -327 -> 0xFEB9
// Max Speed CCW -> -6000 RPM -> -0.996805 -> -32663 -> 0x8069
But main questions are
1. How 0x7F97 is 0.996805 i tried hard to understand but not able to decode.
My analysis is something like this. I am assuming it is 16 bit and Q15 Format. 1 Integer and 15 Fractional bits
0x7F97
B15 is signed bit,
(2^-1) + (2^-2) + (2^-3)+
(2^-4)+(2^-5)+(2^-6)+(2^-7)+
(2^-8)+2(^-11)+
(2^-13)+(2^-14)+(2^-15) = 0.996795654 but it does not match with 0.996805.
2. The other related question why he should select 32663?
Please help.