Simple RTC class based on DS1307. Emphasis on simple. Allows you to run at 100k or 400k Hz (for newer DS1307 capable devices). MapTime() allows you to set the time() service to the same as the RTC. Uses struct tm throughout so you can use traditional time functions for manipulation.

Dependents:   AdaFruit_RGBLCD

Revision:
2:3dc63e48cb5d
Parent:
1:8952befe5d36
Child:
3:ed1628b05d37
--- a/RTclock.cpp	Sat Aug 09 09:27:40 2014 +0000
+++ b/RTclock.cpp	Sat Aug 09 09:54:36 2014 +0000
@@ -96,7 +96,7 @@
     aBuffer[3] = in_sTM.tm_wday;
     aBuffer[4] = DecimalToBcd(in_sTM.tm_mday);
     aBuffer[5] = DecimalToBcd(in_sTM.tm_mon);
-    aBuffer[6] = DecimalToBcd(in_sTM.tm_year-2000);
+    aBuffer[6] = DecimalToBcd(in_sTM.tm_year + 1900 -2000);
 
     // Write new date and time
     SetRunning(false);