Guys in my clock I use a DS1307 chip with PIC.The code works well.
I have two buttons to adjust the time "Hour" & "Minutes"
But sometimes I cannot write to DS1307.But it reads well.The display time is correct.
So after I remove battery & place it back I can write.
Whats the correct way of writing to DS1307?
I use SQW output also to interrupt @ 1 sec.
Do I need to turn off CH (clock Halt bit) or do I need to Stop SQW bit before writing to Hour or Minute registers?After writing registers I clear the seconds registers too.
I have two buttons to adjust the time "Hour" & "Minutes"
But sometimes I cannot write to DS1307.But it reads well.The display time is correct.
So after I remove battery & place it back I can write.
Whats the correct way of writing to DS1307?
I use SQW output also to interrupt @ 1 sec.
Do I need to turn off CH (clock Halt bit) or do I need to Stop SQW bit before writing to Hour or Minute registers?After writing registers I clear the seconds registers too.
Last edited: