C Program To Convert Ascii To Bcd

Posted : adminOn 5/10/2018

Beat Mix Program. Code: unsigned char time[9]; unsigned char sec; unsigned char min; unsigned char hour. Unsigned char getSeconds(); unsigned char getMinutes(); unsigned char getHours(). Sec = getSeconds(); min = getMinutes(); hour = getHours().

Jun 19, 2012 Dear All This is related to PIC 16f877a and HiTech C Compiler Can I have the library function for BCD to ASCII convert Thanks in advance. Thread 20683: I am trying to use the following code to convert 2 digit ASCIInumbers to BCD number, for setting RTC Clock DS1307.unsigned char ASCII_TO_BCD(unsigned. An Assembly program to convert ASCII code to its BCD equivalent. I'm trying to convert a BCD to ascii and vice versa and saw a solution similar to this while browsing. BCD to Ascii and Ascii to BCD. Software Recommendations.

Time[0] = BCD2UpperCh(hour); time[1] = BCD2LowerCh(hour); time[2] = ':'; time[3] = BCD2UpperCh(min); time[4] = BCD2LowerCh(min); time[5] = ':'; time[6] = BCD2UpperCh(sec); time[7] = BCD2LowerCh(sec); time[8] = ' 0'; putStringLCD(time); Does the above example help?

See More On StackoverflowGive More Feedback