This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

itoa not supported by Code Composer

I'm using Code Composer Studio for a USB to UART program using a MSP430 5438A.  I need to convert integers to string characters and was trying to use the itoa function which apparently is not supported by Code Composer.  I realize sprintf would probably work, but one of the constraints for this program is for it to be as efficient and low-power as possible and I've been told that using the sprintf function with microcontrollers is a bad idea.

Is there a library I can include in Code Composer which allows me to use to the itoa function?  If not, is there an alternative to using sprintf for integer to character conversion?  Any suggestions and comments would be appreciated.

Thanks.

  • Hi Samuel,

    just a quick hint, if you go to the wikipedia, there is already an example source code for itoa() function implementation:

    http://en.wikipedia.org/wiki/Itoa

    but unfortunatelly you can not give the base/radix parameter. However at the bottom of the wikipedia page, i found quite an interesting link for various itoa implementations:

    http://www.jb.man.ac.uk/~slowe/cpp/itoa.html

    Hopefully this helps you.

     

    regards,

**Attention** This is a public forum