Black Lives Matter - Action and Equality. ... Adafruit is part of the Stop Hate for Profit campaign. Adafruit is open and shipping.
0

DS1307 RTC 3.3v Board
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

DS1307 RTC 3.3v Board

by krt72012 on Thu Dec 10, 2015 10:50 am

I'm having trouble getting my DS1307 RTC working with my 3.3v microcontroller (M0). I have a coin cell in it.

I always get this message no matter how i modify my code:
RTC is NOT running!
(165/165/2165 - 165:165:85)

I've tried adjusting it in every way I can find and it still remains at that weird time. I have the two resistors removed to keep I2C down to 3.3 V.

I've tried powering it from a USB port (@5v standard) and from a 5V wall outlet.

Code: Select all | TOGGLE FULL SIZE
void initRTC()
{
  Wire.begin();
 
  rtc.begin();

  if (! rtc.isrunning())
  {
    Serial.println("RTC is NOT running!");
    writeSD("RTC is NOT running");

    //rtc.adjust(DateTime(2015, 12, 9, 11, 18, 0));
   
    // following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(__DATE__, __TIME__));
  }

  DateTime now = rtc.now();
  String timestring = "(";
  timestring = timestring + now.month();
  timestring = timestring + '/';
  timestring = timestring + now.day();
  timestring = timestring + '/';
  timestring = timestring + now.year();
  timestring = timestring + " - ";
  timestring = timestring + now.hour();
  timestring = timestring + ':';
  timestring = timestring + now.minute();
  timestring = timestring + ':';
  timestring = timestring + now.second();
  timestring = timestring + ')';
  timestring = timestring + ' ';
  Serial.println(timestring);
}


image1.JPG
image1.JPG (591.91 KiB) Viewed 1272 times


image2.JPG
image2.JPG (536.4 KiB) Viewed 1272 times


image3.JPG
image3.JPG (415.57 KiB) Viewed 1272 times

krt72012
 
Posts: 9
Joined: Mon Feb 02, 2015 6:06 pm

Re: DS1307 RTC 3.3v Board

by adafruit_support_rick on Fri Dec 11, 2015 3:08 pm

You need the pullup resistors. You can replace them and try powering the DS1307 with 3.3V. Or you can connect the resistors between SDA and 3.3V and SCL and 3.3v

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: DS1307 RTC 3.3v Board

by krt72012 on Fri Dec 11, 2015 4:35 pm

adafruit_support_rick wrote:You need the pullup resistors. You can replace them and try powering the DS1307 with 3.3V. Or you can connect the resistors between SDA and 3.3V and SCL and 3.3v


Just tried both and still getting the same output.

krt72012
 
Posts: 9
Joined: Mon Feb 02, 2015 6:06 pm

Re: DS1307 RTC 3.3v Board

by adafruit_support_rick on Sat Dec 12, 2015 12:02 pm

We've seen this exact problem before. It almost always comes down to wiring issues.
But we can try replacing the RTC. Please email support@adafruit.com with a link to this thread for a replacement. When you get it, try it with a Uno or on a breadboard before you solder it into your system.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: DS1307 RTC 3.3v Board

by krt72012 on Mon Dec 14, 2015 10:47 am

adafruit_support_rick wrote:We've seen this exact problem before. It almost always comes down to wiring issues.
But we can try replacing the RTC. Please email support@adafruit.com with a link to this thread for a replacement. When you get it, try it with a Uno or on a breadboard before you solder it into your system.


Yeah I've looked on other threads to see if there was a solution that worked for me. And I've triple checked all my connections; it's odd.
Thank you very much for the help. I buy a lot of things from Adafruit and the excellent customer service keeps me coming back.

krt72012
 
Posts: 9
Joined: Mon Feb 02, 2015 6:06 pm

Please be positive and constructive with your questions and comments.