Jaromir Sukuba

Replace sprintf

Discussion created by Jaromir Sukuba on May 17, 2006
Latest reply on May 22, 2006 by CrasyCat
Hi all,
in my application (I'm using CW3.0 for HC08) I would like to convert int variable into string, to output it on display.
So I placed sprintf function, like that:

int int_var;
char lcd_buffer[86];
sprintf(lcd_buffer,"value is: %i",int_var)

It worked fine, of course, but sprintf function occupied about 6kbytes of flash memory (!!!). Is there a way to shrink it? Or some other function to convert int to string? I know, that sprintf is able to convert float, but it's useless for me, just eating expensive flash memory (I need to convert just integer numbers, like int or char).

Thank you for your help.