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

ftoa

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



Joined: 10 Sep 2003
Posts: 29

View user's profile Send private message

ftoa
PostPosted: Tue May 16, 2006 10:01 am     Reply with quote

does anyone know how to convert ccs 4byte float to decimal manually???

thank you
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue May 16, 2006 10:23 am     Reply with quote

This discussion might help: http://www.ccsinfo.com/forum/viewtopic.php?t=18460&highlight=ieee+float+format
karth



Joined: 10 Sep 2003
Posts: 29

View user's profile Send private message

PostPosted: Tue May 16, 2006 10:58 am     Reply with quote

thanks but I need to know how to conver ccs 32 byte hex into ascii'
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Tue May 16, 2006 11:34 am     Reply with quote

There is a special function to do that.

printf
karth



Joined: 10 Sep 2003
Posts: 29

View user's profile Send private message

PostPosted: Tue May 16, 2006 11:44 am     Reply with quote

I don't want to output through UART
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue May 16, 2006 11:48 am     Reply with quote

sprintf()
rtfm()
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Tue May 16, 2006 4:07 pm     Reply with quote

kender wrote:
sprintf()
rtfm()

Didn't you mean :
Code:
rtmf(sprintf())
Laughing
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue May 16, 2006 6:41 pm     Reply with quote

kender wrote:
sprintf()
rtfm()


Read it better, you forgot about

ITOA()
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed May 17, 2006 1:28 am     Reply with quote

Mark wrote:
kender wrote:
sprintf()
rtfm()


Read it better, you forgot about

ITOA()
The original question was about how to convert a 4byte float, not an integer. So sprintf() is correct.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Wed May 17, 2006 6:40 am     Reply with quote

ckielstra wrote:
Mark wrote:
kender wrote:
sprintf()
rtfm()


Read it better, you forgot about

ITOA()
The original question was about how to convert a 4byte float, not an integer. So sprintf() is correct.


Well his first post said float but his second said "32 byte hex" which I took it that he meant "32 bit hex" which is not a float. Razz
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