-
Notifications
You must be signed in to change notification settings - Fork 22
begin()
This function must be called to initialize the MCP7940. The optional boolean return value is set to false if the MCP7940 is not detected otherwise it returns true.
The optional unsigned 16 bit integer "I2CSpeed" parameter allows the I2C bus to be initialized to either the default I2C_STANDARD_MODE of 100KHz or to I2C_FAST_MODE of 100KHz.
If the multifunction pin is to be used it should have a pull-up resistor and it will be set to a high state until an alarm is raised, when it is pulled low. By default the MCP7940 does not active the oscillator on power up, meaning that the time function will be turned off until explicitly turned on by using either deviceStart() or setting the time using the adjust().
...
MCP7940_Class MCP7940; // Create an instance of the MCP7940
...
void setup() {
Serial.begin(SERIAL_SPEED);
while (!MCP7940.begin()) { // Initialize RTC communications
Serial.println("Unable to find MCP7940. Checking again in 1 second.");
delay(1000);
} // of loop until device is located
...
} // of setup
Overview
Installation
Class Instantiation
DateTime Helper Class
TimeSpan Helper Class
begin()
deviceStatus()
deviceStart()
deviceStop()
now()
adjust()
calibrate()
calibrateOrAdjust()
getCalibrationTrim()
weekdayRead()
weekdayWrite()
readRAM()
writeRAM()
setMFP()
getMFP()
setAlarm()
getAlarm()
setAlarmState()
setAlarmPolarity()
getAlarmState()
clearAlarm()
getSQWSpeed()
setSQWSpeed()
setSQWState()
getPowerFail()
clearPowerFail()
getBattery()
setBattery()
getPowerDown()
getPowerUp()
readEUI() {00/01/02 only}
writEUI() {00/01/02 only}
-none-
SetAndCalibrate.ino
SetAlarms.ino
SquareWave.ino
TestBatteryBackup.ino
SimpleBatteryBackup.ino
AccessMemory.ino
RegressionTests.ino