2-digit BCD to Decimal conversion function:
return ((bcd >> 4)*10+(bcd & 0x0F));
Example: myBcd2Dec(01000101) = 45
2-digit Decimal to BCD conversion function:
Example: myDec2Bcd(45) = 01000101
Addicted to electronics, microcontroller, LED Dot Matrix, Led 7-Segment, PIC Digital Clock, Digital Watch, Led Dot Matrix Clock, Led Dot Matrix Watch, GPS and other DIY projects. Short notes about my PIC Microcontroller experiments sometimes it's just a short note sometimes it's a full PIC Microcontroller Project. The information here including source code and schematic are available for FREE, please contact me if you want the source files of the schematics/PCBs.