The MCP795W22 is a low-power Real-Time Clock/ Calendar (RTCC) that uses digital trimming compensation for an accurate clock/calendar, an interrupt output to support alarms and events, a power sense circuit that automatically switches to the backup supply, non-volatile memory for safe data storage and several enhanced features that support system requirements. Along with a low-cost 32,768 kHz crystal, this RTCC tracks time using several internal registers and then communicates the data over a 10 MHz SPI bus that is fast enough to support a programmable millisecond alarm. The device is fully accessible through the serial interface, while VCC is between 1.8V and 5.5V, but can operate down to 1.3V through the backup supply connected to the VBAT input for timekeeping and SRAM retention only. As part of the power sense circuit, a time saver function is implemented to store the time when main power is lost and again, when power is restored to log the duration of a power failure. Along with the onboard serial EEPROM and batterybacked SRAM, a 128-bit protected space is available for a unique ID. This space can be ordered preprogrammed with a MAC address, or blank for the user to program. This clock/calendar automatically adjusts for months with fewer than 31 days including corrections for leap years. The clock operates in either 24-hour or 12-hour format with AM/PM indicator and settable alarm(s). Using the external crystal, the CLKOUT pin can be set to generate a number of output frequencies. In addition, the MCP795BXX devices support a 32 kHz clock output at power-up on the CLKOUT/BOOT pin by using the same crystal driving the RTCC device. For versatility, a digital event detect with a programmable pulse count can identify the 1st, 4th, 16th or 32nd pulse before sending an interrupt. A second event detect with built-in debounce input filter was also implemented to support noisy mechanical switches. Since many microcontrollers do not have an integrated Watchdog Timer, this peripheral has been implemented in the RTCC. For many applications, this function must be performed outside the microcontroller for increased robustness.
Hours, Minutes, Seconds, Hundredth of Seconds, Day of Week, Month, Year, Leap Year