PML's Blog – July 2010 Archive (1)

Converting 2-Digit Hex to Decimal ASCII Code for Display

Some times it is desired to convert a 2-bit hex code into decimal ASCII code.


For example, MCU processes hex number. If the user wishes to display the value code of a counter in a MCU, a conversion to decimal ASCII code will be required. Other wise, when the counter goes up to "11", the actual value in the MCU would be 0x0A, and the corresponding ASCII characters that will be displayed are "0 :"


The following code converts a hex value to decimal…
Continue

Added by PML on July 21, 2010 at 6:00pm — No Comments

© 2024   Created by PML.   Powered by

Badges  |  Report an Issue  |  Terms of Service