Problems Setting Time with the DS1307 with ArduinoMega

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ricklay
 
Posts: 4
Joined: Thu Feb 09, 2012 3:50 pm

Problems Setting Time with the DS1307 with ArduinoMega

Post by ricklay »

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?

User avatar
billn
 
Posts: 23
Joined: Sat Aug 18, 2012 11:25 am

Re: Problems Setting Time with the DS1307 with ArduinoMega

Post by billn »


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

User avatar
ricklay
 
Posts: 4
Joined: Thu Feb 09, 2012 3:50 pm

Re: Problems Setting Time with the DS1307 with ArduinoMega

Post by ricklay »

Perfect - thanks!

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”