Data Storage Tool Display Human Input Protocol Math Motor Control Sensor Signal Generation & Processing Speech & Sound Fun View all Objects


Quick Links
Contact Us
Forums
Support

Register
Login

This object is provided under license. By downloading this object, you are agreeing to the terms of the MIT License.

DS1307 RTC Driver

A DS1307 RTC driver. The code has been fully optimized with a super simple spin interface for maximum speed and is also fully commented.

Provides full support for:

Getting the Seconds, Minutes, Hours, Days, Date, Month, and Years,
Setting the Seconds, Minutes, Hours, Days, Date, Month, and Years,

Reading the NVSRAM,
Writing the NVSRAM,

Turning the Squarewave generator on,
Turning the Squarewave generator off,

Pausing Code execution for milliseconds,
Pausing Code execution for seconds,

Caches the time when the DS1307 RTC is accessed to prevent time desynchronization through multiple accesses to library.

Supports locking of the I2C bus to support multiprocessor access.

Version:
  1.4

Type:
  Object

Attributes:


Author:
  Kwabena W. Agyeman
  kwagyeman@live.com

Categories:
  Sensor

Downloads:
  1,361

Last Updated:
  2010-11-07



User Reviews:

  • Magnus Hauge commented:
    This works perfect with the DS1307 and DS1307 breakout board ("Real Time Clock Module" / BOB-00099) from sparkfun. I was surprised when I saw the neat spin code, small footprint, clear and understandable and 100% straight forward to start with even if there wasn't the sometimes useful 'demo' that outputs to VGA och TV etc! I just changed the settings for which I/O pins to use, and the object did the rest (The object has a wiring diagram, that let's the 3.3V prop interface this 5V device + pullup resistors, in the source and includes the BCD calculations aswell). First I tried a lot of i2 modules, they are all solid as well, but if you are looking for a straightforward object for the DS1307, I think this is it!. I've been using it with the DS1307 breakout board ("Real Time Clock Module" / BOB-00099) from sparkfun, which has: "a Lithium coin cell battery (CR1225 41mAh) will run the module for a minimum of 9 years (17 years typical) without external 5V power.". This together with a propeller demo board, I just soldered it to a small pcb that set it in an upright position so it takes minimum space on the lab/prototype-area. /M.E.S.H
    June 2, 2009 6:04 p.m.




  • Comments on this Object:


    [2011-04-21 08:47:19] Anonymous said:
    The DS1338Z-33 RTC is a 3V3 version of the DS1307 that is software compatible. Reply
    [2011-08-01 21:22:50] Anonymous said:
    I'm having troubles with this board , dates go wrong, like he jumps from 30 september to 31 , and then the day after he goes to 2 october. Anyone know why ? Reply
    [2011-09-10 06:48:09] Kwabena W. Agyeman said:
    The driver was tested with this board http://www.sparkfun.com/products/99 - no problems were encountered. Thanks, Reply

    Post a comment:




    Please contact obex.support@parallax.com with comments or questions.

    Copyright 2011 by Parallax, Inc.