-
Notifications
You must be signed in to change notification settings - Fork 22
setSQWSpeed()
This function sets the frequency of the square wave output on the MFP and can be set to a number from 0 to 3 as per the table below. Setting the speed does not enable the square wave output on the MFP, that needs to be done using the setSQWState function. The current setting can be read using getSQWSpeed.
Square Wave Speed | Description |
---|---|
0 | 1 Hz |
1 | 4.096 kHz |
2 | 8.192 kHz |
3 | 32.768 kHz |
...
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
MCP7940.begin(); // start with compile date-time
MCP7940.setSQWSpeed(2); // set SQW to 8192 Hz
MCP7940.setSQWState(true); // turn on the square wave
...
Serial.print("Square wave speed setting is ");
Serial.println(MCP7940.getSQWSpeed());
...
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