MD_D1307 Real Time Clock Library  1.3
Library to control DS1307 real time clock
Arduino DS1307 Library

The Maxim DS1307 Real Time Clock IC

The DS1307 serial real-time clock (RTC) is a low-power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of non-volatile SRAM.

Microprocessor interface is exclusively through an I2C bidirectional bus.

The device

  • incorporates a battery input, and maintains timekeeping when main power to the device is interrupted.
  • maintains seconds, minutes, hours, day, date, month, and year information.
  • automatically adjusts dates for months with fewer than 31 days, including corrections for leap year.
  • operates in either the 24-hour or 12-hour format with an AM/PM indicator.
  • has and frequency programmable square-wave output.

This library features access to all on-chip features

  • Read and write clock time registers
  • Access to the 64 byte battery backed up RAM
  • Read and write alarm registers and controls
  • Read/write clock and alarm registers as RAM
  • Control of square wave generator (on/off & frequency)
  • Control of clock features (on/off, 12/24H, day of week)

Software Overview


Revision History

Jun 2018 version 1.3.4

  • Cleaned up dependency on ESP8266 for constructor change.

Jun 2018 version 1.3.3

  • Added overloaded constructor specifying sca and scl.

Apr 2018 version 1.3.2

  • Minor changes to code

Feb 2018 version 1.3.1

  • Fixed text in header file
  • Updated documentation to MD standards

May 2017 v1.3

  • Changed examples to remove 'deprecated' compiler warning.

Apr 2016 v1.2

  • Fixed bug in setting the time when in 12 hour mode.

Aug 2015 v1.1

  • Changed class to MD_DS1307 and standardised on lower letter case 1st letter for method names.
  • Added calcDoW method

Copyright

Copyright (C) 2015 Marco Colli. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA