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?
Problems Setting Time with the DS1307 with ArduinoMega
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- ricklay
- Posts: 4
- Joined: Thu Feb 09, 2012 3:50 pm
- billn
- Posts: 23
- Joined: Sat Aug 18, 2012 11:25 am
Re: Problems Setting Time with the DS1307 with ArduinoMega
On the Mega SDA and SCL are on pins 20 and 21
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
Perfect - thanks!
Please be positive and constructive with your questions and comments.