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.

Programming PIC using MPLAB. Help

Status
Not open for further replies.

mz_fadhli

Junior Member level 3
Joined
Jan 26, 2008
Messages
29
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,434
mplab help

Hi guys,
i need your help,how do i convert a hex to decimal using MPLAB assembly language?

Added after 2 minutes:

oh,forgot to mention. How do you convert FE to 254 with each digit in a different register?because i want to display it LCD
 

using mplab

When the data is stored in the main memory it is stored in binary, not hex
 

c convert to hex mplab

Hi,
I don't think there is a conversion module in MPLAB.

But using the Assembly Editor of MLPAB numbers can be represented in HEX or DECIMAL. For example: 0x10 (HEX) is equivalent to .16 (DECIMAL, don't forget the dot before 16 !!!)

Is that what you wanted?
 

mplab help forum

oh,forgot to mention. How do you convert FE to 254 with each digit in a different register?because i want to display it LCD

I would convert your number to BCD format..

BCD is good for this because it sort of extracts each individual digit - so you can easily convert each digit to ASCII or what ever.
 

binary coded decimal conversions with mplab

owh,i think you guys misunderstood..

i want help in designing a program that produce ten base output so that the seven segment produce an appropriate number.

since the result in programming produce a hex base,how do i write a program to convert the hex base to ten base?
 

convert asm to hex using mplab

Hi,

If want to display a value that is in hex as a decimal value on a seven segment led the easiest way is with a Lookup table.

Have a look at this tutorial for a multiplexed 7 segment array, it might be of general help to you, if you download the lessons zip file the code contains the full lookup table .

http://www.winpicprog.co.uk/pic_tutorial10.htm
 

mplab pic assembly programming tutorial

Thanks,that really helped me a lot.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top