Well Im having Tonnes of trouble putting my RTC chip module together and to get it to work with my controller.
I assemble my RTC in the following way:
Crystal leg---------[1 8] ----------5V(shared on a rail that has a
Crystal leg---------[2 7] a pin to the LCD on as well)
------------------[3 6] --------- Pin 20 SDA
| ---------[4 5] --------- Pin 21 SCL
| |
| |
| |
--
+/- ----------------------Ground (shared with other pins from the LCD that need to go into the ground)
*note im using an Arduino mega, the SDA and SCL are located at pin 20 and 21, not pin 4 and 5 as in the previous/smaller models. im assuming that the wire.h library has the ability to distiqunish which board is in use (i.e. if its a mega and therefore use pin 20 and 21) this is the case as far as i can tell researching. Ludnix, your going to come across this problem i think as well, hopefully you'll jsut have to change your wire locations.
In the Duelmore models pin 4 and 5 had Pull up resistors built in again im assuming this is the case in the mega, but i could be wrong.
i need to go pick some 4.7K resistors up anyhow at some point. for my DS20BS18 chips.
can anyone see anything painfully obvious? with my hardware layout?
Secondly coding wise, for testing purposes i just used one fo the generic testing cases knocking on the net
When i run the code it doesnt set the RTC values to the values i set
i.e. RTC.set(DS1307_SEC,32);
but instead prints out
0:0:0 0/0/2007 DOW:0
and doesnt "incriment up" as time goes by, i can see the screen flickering as the screen is refreshed via the loop(); but the seconds just stay at 0, its not something stupid like me resetting the values to 0 each loop.
i even tried your code Ludnix (modified for my 16x2).
Anyone got any ideas?
a step by step would be nice if anyone has one in building a DIY RTC

(again i've looked at that one you posted ludnix time and time again and cant see what im doing differently...)
Help would be appriciated.
(next week we have Temp probes to work through XD (they came today))