-
Notifications
You must be signed in to change notification settings - Fork 22
Overview
Arduino library for accessing the Microchip MCP7940 real time clock.
The MCP7940 Datasheet describes the chip in detail. While there is no breakout board available for this chip at the present time, it is not difficult to build into a project. The MCP7940 is available as a PDIP 8 pin which allows for easy use on a breadboard and the only additional parts necessary are a 32.768kHz crystal with 2 small capacitors (~6pF, depends upon circuit capacitance) and some pull-up resistors for the data lines and for the multifunction pin, if that is to be used.
Apart from performing as a real-time clock, the MCP4790 has 64 Bytes of SRAM available for use and features 2 separate alarms that can be set to be recurring or a single use. The alarm state can either be checked using the library or can pull down the the MFP (multi-function pin) for a hard interrupt or other hardware action. The MCP7940 allows for software trimming and the library has functions which support fine-tuning the RTC.
See the wiki list of sample programs
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