Datasheet

2012-2018 Microchip Technology Inc. DS20002300C-page 21
MCP7951X/MCP7952X
5.4 Alarms
The MCP795XX features two independent alarms.
Each alarm can be used to either generate an interrupt
at a specific time in the future, or to generate a periodic
interrupt every second (Alarm 1 only), minute, hour,
day, day of week, or month.
There is a separate interrupt flag, ALMxIF, for each
alarm. The interrupt flags are set by hardware when the
chosen alarm mask condition matches (Ta bl e 5- 5 and
Table 5-6). The interrupt flags must be cleared in
software.
For alarm outputs to function, the Square Wave Output
function must be disabled. Each of the two independent
alarm signals are assigned to the MFP pin where either
can pull it low. The pin will stay low until both the alarm
flags are cleared. The alarm output to the MFP pin is
available while operating from the backup supply.
All time and date values are stored in the registers as
binary-coded decimal (BCD) values.
TABLE 5-5: ALARM 0 MASKS
TABLE 5-6: ALARM 1 MASKS
Note: Throughout this section, references to the
register and bit names for the alarm
modules are referred to generically by the
use of ‘x’ in place of the specific module
number. Thus, “ALMxSEC” might refer to
the seconds register for Alarm 0 or
Alarm 1.
ALM0MSK<2:0> Alarm 0 Asserts on Match of
000 Seconds
001 Minutes
010 Hours
011 Day of Week
100 Date
101 Reserved
110 Reserved
111 Seconds, Minutes, Hours, Day of
Week, Date, and Month
ALM1MSK<2:0> Alarm 1 Asserts on Match of
000 Seconds
001 Minutes
010 Hours
011 Day of Week
100 Date
101 Hundredth of Seconds
110 Reserved
111 Seconds, Minutes, Hours, Day of
Week, and Date
Note 1: The alarm interrupt flags must be cleared
by the user.
2: Loading invalid values into the alarm
registers will result in undefined
operation.