Hi I am looking for source for 8052. Float to ascii conversion float "lenght" is in the range -99999.999 to 99999.99 Thank you very much mbosko@ptt.yu
printf? sprintf?
Do you need to aviod using printf? Your required range seems rather strange. Still, given that you only seem to need 8 or so digits, you could convert n by multiplying by 1000, and then treat the result as a fixed point number that is relatively easy to convert to ASCII.
I should have said... ...multiplying by 1000, cast to a long, and then...
Hi Thanks for answers There is compiler from INDIA IDE51 with built in function for float to string conversion I dont know how to do the same with KEIL 7 this is from IDE51: flot2str(Lenght, buf) for (i = 0; i < 10; i++) { sendbyte(buf[i]);//SBUF = buf[i]; }
View all questions in Keil forum