electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

float to ascii


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> float to ascii
Author Message
microlab



Joined: 04 Mar 2006
Posts: 106
Helped: 3


Post20 Apr 2007 13:15   

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
Back to top
Google
AdSense
Google Adsense




Post20 Apr 2007 13:15   

Ads




Back to top
waseem



Joined: 13 Apr 2005
Posts: 241
Helped: 35


Post21 Apr 2007 4:40   

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.
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> float to ascii
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
float to ascii conversion (4)
float net and float pin in netlist (2)
hex to ascii ascii to hex source file need (3)
ascii to binary and binary to ascii (3)
float???? (3)
Float or Fix (11)
float to fixed (2)
float to char (8)
fast float routine in c (2)
sending a float in serial (14)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS