This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

hex to ascii string

Dear all,

Hopefully someone can help me out..!!! I'm in a bit of a fix and I just can't find how to do it. This is a "C" question and has nothing to do with the C51 product, so please bare with me.

What I need. I enter a decimal number, say 1000. Which is 0x03E8 hex. I want to convert this into an ascii string something like
{31,30,30,30} in order to print to an LCD.

Could someone post a snippet so that I have an idea how to do this. I know there must be a simple solution. Even browsing the web didn't give me a solution.

Thanks in advance

John Garrelts

0