Skip to content

Commit

Permalink
Minor Fix
Browse files Browse the repository at this point in the history
Issue #8 incorrectly sets the 24-clock in begin()
  • Loading branch information
SV-Zanshin committed Dec 18, 2017
1 parent d291a61 commit 2166a19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MCP7940.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ bool MCP7940_Class::begin() { //
Wire.beginTransmission(MCP7940_ADDRESS); // Address the MCP7940M //
uint8_t errorCode = Wire.endTransmission(); // See if there's a device present //
if (errorCode == 0) { // If we have a MCP7940M //
writeByte(MCP7940_RTCSEC,readByte(MCP7940_RTCHOUR)&B10111111); // Use 24 hour clock //
writeByte(MCP7940_RTCHOUR,readByte(MCP7940_RTCHOUR)&B10111111); // Use 24 hour clock //
writeByte(MCP7940_CONTROL,readByte(MCP7940_CONTROL)|0x80); // assert alarm low, default high //
_CrystalStatus = readByte(MCP7940_RTCSEC) >> MCP7940_RTCSEC_SC; // Status bit from register //
_OscillatorStatus = readByte(MCP7940_RTCWKDAY)>> MCP7940_RTCWKDAY_OSCRUN; // Oscillator state from register //
Expand Down
1 change: 1 addition & 0 deletions MCP7940.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
** **
** Vers. Date Developer Comments **
** ====== ========== ============================= ============================================================== **
** 1.0.5b 2017-12-18 https://github.com/SV-Zanshin Bug #8 - incorrect setting to 24-Hour clock **
** 1.0.5a 2017-10-31 https://github.com/SV-Zanshin Bug #6 to remove classification on 2 template functions **
** 1.0.4c 2017-08-13 https://github.com/SV-Zanshin Enhancement #5 to remove checks after Wire.requestFrom() **
** 1.0.4b 2017-08-08 https://github.com/SV-Zanshin Replaced readRAM and writeRAM with template functions **
Expand Down

0 comments on commit 2166a19

Please sign in to comment.