INT8 to ASCII conversion

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,
anyone knows better function than itoa() in C, cos i just want to convert a signed char to a ascii string.

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What constitutes a better function?

Keep it simple it will not bite as hard

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i want it to be faster than itoa(), cos itoa convert a integer to ascii string, but here i just have a signed char

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What's the problem with just promoting it?

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

darthvader wrote:
i want it to be faster than itoa()

So how long does itoa() take?

And just how fast do you need it to be?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...