Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do my float variables in MPLABs Watch window have the wrong value?

0
Posted

Why do my float variables in MPLABs Watch window have the wrong value?

0

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.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.