Memorial day is 05/25/2015 – Orders will ship out on May 26th. There will not be any deliveries or shipping on Monday. Any order placed after 11am ET on Friday May 22nd will not start to ship out until Tuesday May 26th.

Problems Setting Time with the DS1307 with ArduinoMega
Moderators: adafruit_support_bill, adafruit

Problems Setting Time with the DS1307 with ArduinoMega

by ricklay on Sun Oct 28, 2012 8: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 3:50 pm

Re: Problems Setting Time with the DS1307 with ArduinoMega

by billn on Sun Oct 28, 2012 11: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 11:25 am

Re: Problems Setting Time with the DS1307 with ArduinoMega

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

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