Problems Setting Time with the DS1307 with ArduinoMega

by ricklay on Sun Oct 28, 2012 7:04 pm

I built the DS1307 and connected it to my Aurdino Mega2560 - connected the +5 and GND. Also analog pin 4 to SDA and analog pin 5 to SCL. I loaded the example program in the tutorial and loaded it to the Aurdino with no issues. It kept indicating the base time - not the current time. The line in the example code to 'set' the time was not commented. Voltage was checked and good. Baud and COM was also good. I took out the Mega and replaced it with an Uno and re-configured for the new board and made the same connections. This time the time set exactly as expected.

What did I miss?
ricklay
 
Posts: 4
Joined: Thu Feb 09, 2012 2:50 pm

Re: Problems Setting Time with the DS1307 with ArduinoMega

by billn on Sun Oct 28, 2012 10:18 pm


I built the DS1307 and connected it to my Aurdino Mega2560 - connected the +5 and GND. Also analog pin 4 to SDA and analog pin 5 to SCL. I loaded the example program in the tutorial and loaded it to the Aurdino with no issues. It kept indicating the base time - not the current time. The line in the example code to 'set' the time was not commented. Voltage was checked and good. Baud and COM was also good. I took out the Mega and replaced it with an Uno and re-configured for the new board and made the same connections. This time the time set exactly as expected.

What did I miss?


On the Mega SDA and SCL are on pins 20 and 21
billn
 
Posts: 23
Joined: Sat Aug 18, 2012 10:25 am

Re: Problems Setting Time with the DS1307 with ArduinoMega

by ricklay on Mon Oct 29, 2012 10:16 am

Perfect - thanks!
ricklay
 
Posts: 4
Joined: Thu Feb 09, 2012 2:50 pm