Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Binary to Decimal conversion

Status
Not open for further replies.

zeeba

Junior Member level 2
Joined
Sep 26, 2010
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,424
Hi

I want an assembly code for pic16f876a to convert from 16 bit binary number to 5 digit decimal and display it on LCD
can any one help me ??
 
Last edited:

I didn't find what I need
I want to convert from binary to decimal
 

Hi,

I want to convert from binary to decimal


No you don't !

You said you wanted to display a 16 bit value onto 5 characters of the LCD so you need the 16 bit to ASCII decoder show on that page.

ASCII is the format needed for the LCD.

Or are you wanting to do something different ?


If you want to do something different with the 16 bit data before you dispay it then you need to say what you are wanting to do.
 

You said you wanted to display a 16 bit value onto 5 characters of the LCD so you need the 16 bit to ASCII decoder show on that page.

ASCII is the format needed for the LCD.

Or are you wanting to do something different ?

well,,
I want to take an analog input from two sensors [LDR] and display them on the LCD ..
so I need to convert analog to digital [binary] then convert the binary to decimal to disply it on the LCD

If it is same as what you are telling me then I already have what I want :razz:

but I found this
Binary to Decimal Test Routine for PIC16F84

how can you explaine that :-?
 

Hi,
If it is same as what you are telling me then I already have what I want

Well don't know what you have got already ..?

To do what you want you do need the one that converts to Ascii.

You need to understand what Ascii format is as everything that is sent to the lcd must be in ascii format - perhaps you do have such code already but just do not yet appreicate that it is doing the conversion to ascii for you.

I have used several of those piclist converts for my display routines and they work well.

Sending data in and out of the pic, like Rs232 comms with the PC etc again uses the Ascii format as the common format between the two devices.

Post your code if you are not sure what its doing .
 

Hi,
I had done a project that needed this kind of conversion from 24bit binary to a decimal number which was latter converted to ascii for dispaly on an lcd. Can some one elaborate the algo rather than give code links as algo can be adopted for any processor family (pic, avr or 8051). I tried the booths algo for this but couldn't make much sense about the booths algo!!!

Its easy to convert a binary to decimal using paper and pencil as number are expressed as sum of successive powers of 2^n where n takes diffrent from 0 to 23 (in case of a 24 bit number)

Asimov
 

Hi,

Hi,
I had done a project that needed this kind of conversion from 24bit binary to a decimal number which was latter converted to ascii for dispaly on an lcd. Can some one elaborate the algo rather than give code links as algo can be adopted for any processor family (pic, avr or 8051). I tried the booths algo for this but couldn't make much sense about the booths algo!!!

Its easy to convert a binary to decimal using paper and pencil as number are expressed as sum of successive powers of 2^n where n takes diffrent from 0 to 23 (in case of a 24 bit number)

Asimov


Have not seen any algo tutorials as such, there might be some books containing such details.

Think you will just have to study typical PICLIST or AVR routines and see how they have done it.
Some AVR examples here **broken link removed**
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top