Where does the code look like I'm clearing the whole register.
On the other note, I'm not aware of the ability to change the register content without stopping the clock. I probably never want to stop the clock. I don't recall reading anything about the datasheet whether I have to stop the clock before modifying the contents before they change again.
I think they are the same. However, your function call is more efficient since there is one less operation. My function call included an extra operation of shifting the 0 in bit 0 to the left seven times.
You're still writing over the seconds register no matter how you figure it. You should write the seconds last and let it run. It does all the MDY calcs on its own till year 2100. Are you trying to make it a stopwatch?
It's not that it is faster. Burst mode has the advantage that none of the registers are written until you write the eight one, therefore ensuring that a register can't rollover during the update.
Alternatively, writing the seconds register first with a value other than 0x59 will make sure that rollover can't happen during the update.
hi,
I downloaded the attached asm file from the web yesterday.
Recently got a couple of DS1307's, used the asm file as a quick test with a 16F628A, worked OK.
Time set/read is via RS232.
I will re-search the web so I can credit the author..