Ouch sprintf is 6000+ bytes to get Float to LCD

Discussion created by PG1 on Sep 13, 2011
Latest reply on Sep 14, 2011 by bigmac

I need to take a floating point number from -9999. to -.0001 to 0 to .0001 to 9999.  and display it on an  7 segment 4 digit LCD.


I had planned to use sprintf to take the float (or double)  and convert it to an ascii string stored in a buffer. Then the buffer could picked apart to get the sign, digits, and proper decimal point. location.


But the freescale implementation of sprintf is over 6000 bytes.


Does anyone have any suggestions for code which does not occupy as much space?