I have tried 3 I2C (in assembly) routines successfully programming 24C02- 24C16 eproms , to program RTC DS 1307 through a 16F877 /4Mz. I find that all the routines are inconsistent in writing and reading the RTC ( success rate of 70%) while they successfully program the 24Cxx. Perhaps this is due to the fact that the datasheet of DS1307 says it works only on 100 KHz I2C and not on 400KHz I2C . I am unable to get any improvement in performance even by adding delays suggested by some sites searched through Google. Any advice for solving this problem is welcome. Thanks in advance Rajiv Thakur -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu