Get 2byte (hex/bin) to ASCII?

Status
Not open for further replies.

Camping

New Member
I have made a program for a PIC and I get 2bytes that are the Voltage from some output. I want to display it on a LCD so I have to get it to some ASCII digits. But this is what I don`t know how to do.

So I hope some has a link or a ASM for me where I can find some routines that can make 2bytes of me RAM (BIN) to 4bytes RAM (ASCII)

Thanks,
 

If you look on my PIC tutorials at http://www.winpicprog.co.uk, the LCD tutorials have a routine for printing 2 bytes as 5 ASCII characters, it takes 5 as it goes up to 65,535.
 
Thanks, but it looks your link doesn`t realy work normal,

But I have found me some stuff that can do it to. I found a 16/16 function so that will do it. (first /10000d then /1000d and so on and then you have it done)

Thanks,

So if you can post a working link again then I can look at your site meaby there are some more thinks that are intresting,

Thanks,
 
During school time, I do binary-to-decimal conversion by using calculator. Didn't really bother to calculate it manually.
I forgot the name of the method, in this method, have to divide it with 10, the remainder is LSB; then divide the quotient again with 10, get the remainder to be second LSB.. and so on.
 
Camping said:
So if you can post a working link again then I can look at your site meaby there are some more thinks that are intresting,

Thanks,

Looks like there's a problem at the moment with my forwarding service, you can access it directly at:
**broken link removed**
 
Thanks,

I will look to your site,

Yep the /10 is how to do it. I have seen it in a sample. I have programed it and I will try it out soon.

Thanks,
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…