DS1307 RTC Driver

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Request group membership
By: Kwabena W. Agyeman, created: 2013-04-05 | updated: 2013-04-05

 

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.
 
Original File Upload
AttachmentSize
Package icon DS1307_RTCDemo_1.zip15.79 KB

Comments

[originally posted by Anonymous on 2011-04-21 08:47:19] The DS1338Z-33 RTC is a 3V3 version of the DS1307 that is software compatible.

[originally posted by Anonymous on 2011-08-01 21:22:50] 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 ?
 
[originally posted by Kwabena W. Agyeman on 2011-09-10 06:48:09] The driver was tested with this board http://www.sparkfun.com/products/99 - no problems were encountered. Thanks,