Jump to content
Sign in to follow this  
marcob

Hex To Decimal Conversion

Recommended Posts

Hi guys,

I want to write a routine in order to convert an hex number into a decimal one, and the opposite. I mean, I have a number (i.e. 3A0 in Hex) and I want to display it in decimal on an LCD.

I've seen the answers to the other question for the adc, but I'd like to have this routine for every number and not only till 1023. :(

Have you got anything for me?

Thanks a lot, :lol:

Marco

Share this post


Link to post
Share on other sites

marcob,

 

Have a look in the lcd_driver.h header file.

Look at the lprintf( char*, int ); function, it converts a number into ascii with hex, decimal or binary format.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...