I thought you wanted to convert BCD output to binary as you wrote:
RTC give me sec value in BCD format.
I still don't get what you're trying to achieve!
Thanks to all,
i want to implement this calculation, result should be BCD.
60 - 01 = 59
99 - 01 = 98
98 + 60 = 158
158 - 99 = 59
Which of these numbers come in BCD? All? None? Some, which ones? Do you only need to convert the results to BCD? If the latter, check the thread below that has an example code which converts binary to BCD. Or be more clear pls.