hi sir, i am new to this rtc ds1307 and want to know dat according to its datasheet it is battery backed....does that mean that you need not initialize it when you use it for the first time?????
and if i want to simulate it on proteus software it shows correct date and time automatically without writing it for the first time.....
i m unable to understand all this plzzz help me out....and i m sorry if i irritated you...
"i m not getting what type of mistake i am committing plz help me out to resolve this error."
you can isolate your problem into 3 parts:
1) the i2c routines: make sure that your i2c routines work; 2) the ds1307 routines: once you are sure that your i2c routines work, you can try to make sure that the ds1307 related routines do what they are supposed to do; 3) the lcd routines: this is distinct and separate from the first two parts and you should just load up some charts and make sure that they are displayed correctly on the lcd.
once you have those individual parts right, you can try to assemble them together. andrew and per are right in that your current routines, on the first glance, don't seem to be right. but your basic structure is good.
thank you so much sir and i understood my mistake i.e. the slave address i was giving shouldn't be 0xA0 and 0xA1 but they should be 0xD0 and 0xD1 respectively...
But have you understood all the other issues that have been pointed out...?
yes, i have understood how to deal with the problem and it is resolved... thank you all for helping me..
That wasn't what I asked you - was it?!
I asked if you had understood all the other issues that have been pointed out.
Apparently not!