Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

floating point issue in ds pic

Status
Not open for further replies.

raman00084

Full Member level 6
Joined
Nov 29, 2010
Messages
353
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,298
Activity points
3,950
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:

BradtheRad

Super Moderator
Staff member
Joined
Apr 1, 2011
Messages
14,688
Helped
2,867
Reputation
5,744
Reaction score
2,876
Trophy points
1,393
Location
Minneapolis, Minnesota, USA
Activity points
109,735
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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top