Datasheet

Dec2Bcd16
567
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
unsigned Dec2Bcd16(unsigned decnum);
Returns Converted BCD value.
Description
Converts unsigned 16-bit decimal value to its BCD equivalent.
Parameters :
- decnum unsigned 16-bit decimal number to be converted
Requires Nothing.
Example
unsigned a, b;
...
a = 2345;
b = Dec2Bcd16(a); // b equals 9029