A quick search on DS1307 will get you a long way. But since your SEARCH function seems to be broken, I'll show you use mine.
http://rentron.com/PicBasic/SERLED.htm
No, this code isn't 100% perfect for what you need, but I'll bet ANYTHING that you can easily modify for your purposes.
And besides, why are you trying to set the same time that you're trying to read?
If the set time is zero and the read time is zero, then it seems to me that your program, if that is the whole program, is working correctly.
Got any pullups on the I2C lines?
Bookmarks