Creative Commons images are CC BY-NC-SA 3.0

Description: This is the SparkFun Real Time Clock (RTC) Module, this little breakout that uses the DS1307 to keep track of the current year, month, day as well as the current time. The module comes fully assembled and pre-programmed with the current time (MST) and includes a small CR1225 Lithium coin cell battery that will run the RTC for a minimum of 9 years (17 years typical) without an external 5V power supply.

The DS1307 RTC is accessed via the I2C protocol. We’ve written a test-bed to program the modules, this code should give you some insight on how to interface the module to any microcontroller using our example software I2C and BCD routines.

This rev of the Real Time Clock module finally adds I2C resistors and a larger battery pad to fix the problems with the battery shorting to the board.

Note: This item may take longer to process due to battery installed in the equipment and therefore does not qualify for same-day shipping policy. Sorry for any inconvenience this may cause.

Features:

  • Two wire I2C interface
  • Hour : Minutes : Seconds AM/PM
  • Day Month, Date - Year
  • Leap year compensation
  • Accurate calendar up to year 2100
  • Battery backup included
  • 1Hz output pin
  • 56 Bytes of Non-volatile memory available to user
  • 0x68 I2C Address

Dimensions: 0.75x0.75" (20x20mm)

Documents:

Customers Also Purchased

Customer Comments

  • According to DS1307’s datasheet, it needs a minimum voltage of 4.5V to work. How can a 3V battery (CR1225) work at all?

    • Because the battery doesn’t run the module. The battery is there just to keep time when the unit is powered off, but you can’t communicate with the module at all when its just powered via the battery.

      • I found it so hard to believe that it really needed 5V that I had to check the datasheet. And it’s true! Next I checked the calendar, and we’re indeed in the 21st century! Maybe you should make a breakout board with an NXP PCF2123. This can communicate at Vdd from 1.8V to 5V, operates down to 1.1V and consumes only 100nA. That’s the 21st century! :-)

        (BTW, the PCF2123 is SPI. The I2C version is the PCF8523)

  • Is the 1 Hz square wave synced with the clock on the chip. I.E. Does the second roll over during the transition of the square wave?

    If I query the chip right before the 1 Hz pulse and right after. Will the seconds have incremented. I have looked through the datasheet and it is not clear on this.

  • Does this module include the crystal oscillator? I see that sparkfun has a 32.768kHz crystal available for sale, but it is not listed in “Also Purchased” ——-> so it doesn’t appear that people are buying them with this module.

    • Yes - it’s a complete module built around the RTC and includes the board with all the components on it as shown.

  • I confirm DS1307 work well on 3.3V GPIO with 1K pullup resistors on SDA/SCL, dont forget to unsold SJ2 jumper and supply 5V power. For information my board got 4.7K on SDA/SCL,it’s too much and dont work well. START falling edge on SDA pin is not clear with 4.7K, with 1K signal is perfect on 3.3 V GPIO.

  • So if I remove the solder jumpers on SDA/SCL it will bypass the pull up resistors. Could this then be used on a BBB using a 3.3v I2C bus instead of 5v (using the BBB pull-ups on the I2C clock and data pins)?

    Sorry for the nob question, but took so long to get a ‘bone that I don’t want to fry it by being a moron.

  • The link to the Arduino code is broken……

    • which link specifically, they all work for me.

      • The [English] Arduino Tutorial doesn’t work. I just got an error that they’re experiencing technical difficulties. The specific error message I got was this:

        (Can’t contact the database server: Can’t connect to MySQL server on ‘larry’ (111) (larry))

        I do live in the Central US, if that might somehow help, and ATT is my ISP.

        • Yeah, their site is having issues. I would just check the Bildr tutorial instead, it’s pretty good.

  • The pad says 5V but the coin cell is 3V. Can I run this on 3.3VDC if everything else on the i2c bus is 3.3VDC?

  • why would you put the SQW right in the middle of 4 primary I2C pins? shouldnt it be on one of the ends?

  • You can check out my RTCC library for the DSXXXX it has functions for setting, LCD update, display of time and temperature.

    C Sample Code

  • Is that a 0-ohm resistor and does anyone know what size coin-cell battery holder and the crystal? Any help would be much appreciated!

    • The schematic should help you derive that the two black components are 4.7kOhm resistors, the light brown one a 0.1uF capacitor, the crystal a common watch crystal (32.768kHz), and the description states “includes a small CR1225 Lithium coin cell battery”.

  • I was trying to figure out what the jumpers were for, so I tried to take a look at the schematic and eagle files, but both appear to be the older version (V1.3). Do you plan to post the ones for this revision? At the very least, do you mind saying what the apparent jumpers are for?

Customer Reviews

4.5 out of 5

Based on 2 ratings:

5 star
1
4 star
1
3 star
0
2 star
0
1 star
0

1 of 1 found this helpful:

something you need

NOBODY told me you had to SET THE CLOCK !!!! There was a lot about it was set at the factory and would go for 17 years, but nothing about that I had to set the clock. I found it in an obscure tutorial on the use of PICAXE and the I2C serial communication protocol. Please note on your SPARKFUN data spec that the breakout board has to have the data SET with a HI2COUT instruction !


Good clock!

Easy to use, I needed to set the clock too but it is easily accomplished with one line from RTClib (google it)!