Forum Software Ferduino code DS1307 Problem

DS1307 Problem  [SOLVED]


Post Number:#1 Post Wed Dec 21, 2016 4:14 pm
Posts: 19
Topics: 5
Solve rating: 0
Joined: Mon Aug 18, 2014 5:04 pm
Topics: 5
Age: 32
Gender: Male
National Flag:
Italy
Hi Fernando,
sorry if I'm writing again, I do some research but I couldn't find any answer.
Everything now works fine expect the DS1307, I have the iTead lcd shield with the rtc on board, I've tested the connection (on pin 20,21)with your examples and I can find the RTC with 0x68 address and I can read time and date.
When I upload Ferduino, with PCF8575 disabled, I can't connect to the rtc (I already tried switch betwenn 20,21 and 18,19 pin with thw option at the beginning).
What can I try to do? thank you very much again!

Post Number:#2 Post Wed Dec 21, 2016 4:26 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

Post a picture with good resolution to show how the TFT shield is assembled.

Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#3 Post Wed Dec 21, 2016 5:55 pm
Posts: 19
Topics: 5
Solve rating: 0
Joined: Mon Aug 18, 2014 5:04 pm
Topics: 5
Age: 32
Gender: Male
National Flag:
Italy
Here is the photo, both the test code work correct...

Image

Post Number:#4 Post Wed Dec 21, 2016 6:02 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Try this code:

#include <DS1307_HENNING.h>

// Init the DS1307
DS1307 rtc(20, 21);

void setup()
{
  // Set the clock to run-mode
  rtc.halt(false);
 
  // Setup Serial connection
  Serial.begin(9600);

  // The following lines can be commented out to use the values already stored in the DS1307
  rtc.setDOW(DOMINGO);        // Set Day-of-Week to SUNDAY
  rtc.setTime(12, 0, 0);     // Set the time to 12:00:00 (24hr format)
  rtc.setDate(3, 10, 2010);   // Set the date to October 3th, 2010
}

void loop()
{
  // Send Day-of-Week
  Serial.print(rtc.getDOWStr());
  Serial.print(" ");
 
  // Send date
  Serial.print(rtc.getDateStr());
  Serial.print(" -- ");

  // Send time
  Serial.println(rtc.getTimeStr());
 
  // Wait one second before repeating :)
  delay (1000);
}



If you are using italian version change this line:

rtc.setDOW(DOMINGO);


To:

rtc.setDOW(DOMENICA);
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#5 Post Wed Dec 21, 2016 8:10 pm
Posts: 19
Topics: 5
Solve rating: 0
Joined: Mon Aug 18, 2014 5:04 pm
Topics: 5
Age: 32
Gender: Male
National Flag:
Italy
It doesn't work.. I have tried with different language but with the same result... I have also do again the I2C bus scanner and found the device with 0x68 address...

Post Number:#6 Post Wed Dec 21, 2016 8:59 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Friend, the language doesn't matter.

It should be bad contact.

The Henning's library is very sensitive.

Try redo the soldering on IC, resistors (25 - 27) and pins (20-21).
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#7 Post Thu Dec 22, 2016 9:17 pm
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Hi!

The problem was solved?

Best regards.
Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.

Post Number:#8 Post Fri Dec 23, 2016 8:50 am
Posts: 19
Topics: 5
Solve rating: 0
Joined: Mon Aug 18, 2014 5:04 pm
Topics: 5
Age: 32
Gender: Male
National Flag:
Italy
Hi fernando, I've check the solder and find a bad joint between RTC and quartz, now everything works fine!
I have another question, in the web control dashboard it is possible to change the color of the led?
Thank you very much again!

Post Number:#9 Post Fri Dec 23, 2016 8:58 am
Posts: 1699
Topics: 38
Images: 301
Solve rating: 233
Joined: Mon Mar 03, 2014 5:59 pm
Topics: 38
Age: 39
Location: São Paulo
Gender: Male
National Flag:
Brazil

Post your doubts on forum because it can help another user too. Just PM me for support if it's absolutely necessary.




Return to Ferduino code





Who is online

Users viewing this topic: No registered users and 1 guest

cron