This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTC ds12887 is not displaying time correctly.

I am successfully able set the time in ds12887 but while reading time it shows wrong time.
only second value is coming and overriding hour and minute value. So i cant solve this problem.
please take a look in following code.

     void DisplayTime()
     {
        XBYTE[11]=0x20;
        hr = XBYTE[14];
        writeLcdcmd(0x87);
        BCD_Conv(hr);
        WriteLcdData(':');
        min = XBYTE[12];
        writeLcdcmd(0x8A);
        BCD_Conv(min);
        WriteLcdData(':');
        sec = XBYTE[00];
        writeLcdcmd(0x8D)
        BCD_Conv(sec);
     }

but this display only second value and unfortunately hr and min value is also overriding

Parents Reply Children
No data