Why do my float variables in MPLABs Watch window have the wrong value?
MPLAB’s Watch window interprets all floating-point variables (‘float’ or ‘double’) as 32 bit values unless you manually change the properties for each one. Since our PICC compiler uses 24 bits for ‘float’, and also for ‘double’ unless you explicitly specify otherwise, this means all floating point values displayed will appear wrong. To correct the display, right-click on the variable name in the Watch window and select Properties, then change its size to 24 bits.