floating point issue in ds pic

Status
Not open for further replies.

raman00084

Full Member level 6
Joined
Nov 29, 2010
Messages
375
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
4,076
i am using dspic 33ep512mu810. my issue is if i save a floating point number in eeprom it is not saving correctely.
For example if i save float32 val=88.75 then in eeprom it is saving 88.74 .
how to handle this issue. i am using ccs complier. kindly help.
 
Last edited:

I guess float32 means it's stored as 32 bit...
But is it at any time placed in a variable which was defined as 8 bits? Signed, unsigned? Then it may only be accurate to a few digits.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…