MCP7940  v1.2.0
Arduino Library for the MCP7940N and MCP7940M Real-time clocks
RegressionTests.ino File Reference
#include <MCP7940.h>

Functions

void showTime (const DateTime &now)
 
void setup ()
 
void loop ()
 

Variables

const uint32_t SERIAL_SPEED {115200}
 < Include the MCP7940 RTC library More...
 
const uint8_t LED_PIN {13}
 Arduino built-in LED pin number.
 
const uint8_t SPRINTF_BUFFER_SIZE {32}
 Buffer size for sprintf()
 
MCP7940_Class MCP7940
 Create an instance of the MCP7940.
 
char inputBuffer [SPRINTF_BUFFER_SIZE]
 Buffer for sprintf()/sscanf()
 

Detailed Description

Description

This program is used to execute all public functions in the MCP7940 library and check, insofar as possible, whether they functions as expected. This is used during a development cycle to see if any changes or enhancements may have broken previously working functionality.
The MCP7940 library as well as the most current version of this program is available at GitHub using the address https://github.com/Zanduino/MCP7940 and a more detailed description of this program can be found at https://github.com/Zanduino/MCP7940/wiki/RegressionTests.ino

The MCP7940 library uses the standard SPI Wire library for communications with the RTC chip and has also used the class definitions of the standard RTClib library from Adafruit/Jeelabs.

The data sheet for the MCP7940M is located at http://ww1.microchip.com/downloads/en/DeviceDoc/20002292B.pdf. The MCP7940N has extra functionality revolving around battery backup but this library's functionality covers that chip as well.

GNU General Public License v3.0

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Author

Written by Arnd Arnd@.nosp@m.Zand.nosp@m.uino..nosp@m.Com at https://www.github.com/SV-Zanshin

Changelog

VersionDate Developer Comments
1.0.0 2020-11-27 SV-Zanshin Issue #55 - Created sketch

Function Documentation

◆ loop()

void loop ( )

Arduino method corresponding to a "main()" call

◆ setup()

void setup ( )

Arduino method called once upon start or restart.

◆ showTime()

void showTime ( const DateTime now)

Display the DateTime

Converts the DateTime value to a string and display without CR

Parameters
[in]nowis a DateTime construct to display
Returns
void

Variable Documentation

◆ SERIAL_SPEED

const uint32_t SERIAL_SPEED {115200}

< Include the MCP7940 RTC library

Set the baud rate for Serial I/O