在使用PIC18接口DS1306的数字时钟工程中,我想用按钮来增加小时。它运行良好,24小时模式,但有一个问题,当我尝试了12小时模式。例如,在12小时模式下,上午11点=0101 0001;晚上12点=0111 0010;如果我使用按钮使小时增加1,并且指示器AM将变成PM。我真的不知道该怎么办。我真的需要你的建议。提前感谢。
以上来自于百度翻译
以下为原文
During working on digital clock project by using PIC18 interface DS1306, I want to use push button to make an increment of hour. It was working fine with 24-hour mode, but there was an issue when I tried on 12-hour mode. For example, in 12-hour mode, 11 AM = 0101 0001 ; 12 PM = 0111 0010; if I use push button to make the hour increasing 1, and the indicator AM will become PM. I really did not know how to make it happened. I really need your sugges
tions. Thanks in advance.