CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

convert float 4bytes => .decimal manually

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Christophe



Joined: 10 May 2005
Posts: 323
Location: Belgium

View user's profile Send private message

convert float 4bytes => .decimal manually
PostPosted: Thu Jun 16, 2005 5:12 am     Reply with quote

Hi,

a CCS float is: F3F2F1F0 with F0 = LSB and F3 = MSB

How can I convert manually to .decimal?

F0: 128
F1: 111
F2: 175
F3: 175

thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jun 16, 2005 9:11 am     Reply with quote

Quote:
CCS float is: F3F2F1F0 with F0 = LSB and F3 = MSB
How can I convert manually to .decimal?

Are you asking for a ftoa() routine that runs in CCS ?

or,

Are you asking for a program that runs on a PC, in which you type
in those four numbers and it displays the floating point value ?
Christophe



Joined: 10 May 2005
Posts: 323
Location: Belgium

View user's profile Send private message

PostPosted: Fri Jun 17, 2005 1:41 am     Reply with quote

I wanted to calculate on my own, but I found that printf("%f",number);
gives the result.. problem solved!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group