CLEARING THE CH BIT OF THE DS1307 RTC

Hello World,
I am posting to ask the method of clearing the CH BIT of DS1307 RTC.

I dont want any codes, I just want the method to clear that specific bit.

Please Help me :frowning:

Aditya.

You write 0x00 to address 0x00 in the time keeping registers.

If you want to preserve the value of seconds in the rest of the register then read the value first, assign the value to a temporary variable, clear bit 7 in the temporary variable then write that back to address 0x00.

Alternatively, as the value of seconds will almost certainly be wrong anyway if the clock has been stopped so send the correct value for seconds making sure bit 7 is zero.