Microcontroller › AVR › I2C (TWI) address transmission to slave (problem) › HiI think I have found out
I think I have found out the mistake. When you are sending data i.e. TWI_Write_Data(0xA0); //i want to write 10 in seconds memory location of DS1307(RTC), you are actually enabling the CH(Clock Halt) bit which is why RTC is not responding afterwards.
The thing is while writing seconds onto it's register, the 8th bit or BIT7 is dedicated for CH. So when you are writing 0xA0 you are also activating CH bit which is halting the clock of RTC. It you want to write 10 seconds then try sending 0X10 or 0X0A because RTC's register is divided into two parts BIT0-3 which accept values for 1 x seconds while BIT4-6 accept values for 10 x seconds i.e if you write 2 in former part then it will be 2 seconds but if you do the same in latter part then it will be traeted as 20 seconds.
Refer to its datasheet once agin and confirm.