Microcontroller firmware usuallydeals with hexadecimal code. Yousometimes need to display the contentof registers, which requires a hexadecimal-to-BCD (binary-coded-decimal)-code conversion. The ...
A program entitled HEXBCD is an 8051 µC subroutine that converts a 16-bit HEX number in internal RAM locations 33 and 34H into its BCD equivalent (Listing 1). The ...