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.

How to convert float values to ascii ?

Status
Not open for further replies.

microlab

Full Member level 5
Joined
Mar 4, 2006
Messages
309
Helped
44
Reputation
88
Reaction score
35
Trophy points
1,308
Activity points
3,253
float to ascii

dear friends

is there any library functions available in keil to convert the float values to ascii?
there's a function to convert the ascii to float .
or is there any C routine which converts the float value to ascii ?


thanking you

ml
 

Re: float to ascii

Hi!
you can use the "sprintf" function to convert any variable to its ascii values.

unsigned char float_buff[];
temp=23.46;
sprintf(float_buff,"%4.2f",temp);

This will send each digit of the floating point number including the decimal point to the float_buff.


Regards.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top