The MCP7940N-I/SN uses a 32.768 kHz tuning fork crystal as the timebase, divided down by internal counters to generate seconds, minutes, hours, days, months, and years. The I2C serial interface allows a host microcontroller to read and write the timekeeping registers and configure alarm functions. The digital trimming circuit adjusts the crystal oscillator frequency in 1 PPM steps by periodically adding or omitting oscillator cycles, compensating for crystal tolerance and temperature drift. When VCC drops below the switchover threshold, the power-sense circuit automatically switches to the backup battery supply (VBAT, minimum 1.3 V), ensuring continuous timekeeping and SRAM data retention. The alarm registers compare user-programmed values against the current time; upon match, the multifunction output pin asserts and the alarm flag is set in the status register. The CLKOUT pin can output programmable frequencies of 32.768 kHz, 8.192 kHz, 4.096 kHz, or 1 Hz derived from the crystal oscillator.