# 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 dont 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,

#### Nigel Goodwin

##### Super Moderator
Camping said:
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 dont 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.

#### Camping

##### New Member

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,

#### StupidDum

##### New Member
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.

#### Nigel Goodwin

##### Super Moderator
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:

#### Camping

##### New Member
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.

Replies
4
Views
3K
Replies
14
Views
7K
Replies
16
Views
6K
Replies
1
Views
11K
Replies
23
Views
4K