Apr 20, 2007 #1 M 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
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
Apr 21, 2007 #2 W waseem Full Member level 5 Joined Apr 13, 2005 Messages 284 Helped 64 Reputation 128 Reaction score 19 Trophy points 1,298 Location Pakistan Activity points 3,674 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.
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.