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.

conversion of decimal to hexadecimal in embedded C

Status
Not open for further replies.

Nidhitrivedi

Junior Member level 2
Joined
Feb 6, 2012
Messages
20
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,413
Hello everyone,

Can anyone pls help me out with the program of converting decimal number to BCD value in embedded C....

And in which form does the microcontroller take the digits as the value????

Thankyou....
 

mmmm... how many digits do you need?
alas, how many bytes is your number stored?

don't forget, that the microcontrollers has all it's data in binary form, it could be 8 bit integer number, 16 bit integer number, 32 bits integer, or even 32 bit float number.... (too many)
 

What exactly do you mean when you say converting binary to BCD? As Kurenai already said, the numbers in the microcontroller are already in binary, it is only you IDE that displays them in decimal for you?

/Pheetuz
 

mmmm... how many digits do you need?
alas, how many bytes is your number stored?

don't forget, that the microcontrollers has all it's data in binary form, it could be 8 bit integer number, 16 bit integer number, 32 bits integer, or even 32 bit float number.... (too many)


mine is a 4 digit number such as 1000 or 9999 like this way
 

Actually, i have taken the 4 digit numeric input from the keyboard, that input as it is from the keyboard it is in the decimal form. like1234.
Now i want this input number to be used in the formula P=str*7.95 and get the value of P....

I m attaching my program so that you can help me out more...
 

Attachments

  • step2.doc
    35 KB · Views: 122

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top