Datasheet
2010-2014 Microchip Technology Inc. DS20005010F-page 27
MCP7940N
5.5.1 SQUARE WAVE OUTPUT MODE
The MCP7940N can be configured to generate a
square wave clock signal on MFP. The input clock
frequency, F
OSC, is divided according to the
SQWFS<1:0> bits as shown in Table 5 - 8.
The square wave output is not available when operat-
ing from the backup power supply.
TABLE 5-8: CLOCK OUTPUT RATES
5.5.2 ALARM INTERRUPT OUTPUT
MODE
The MFP will provide an interrupt output when enabled
alarms match and the square wave clock output is dis-
abled. This prevents the user from having to poll the
alarm interrupt flag to check for a match.
The alarm interrupt output is available when operating
from the backup power supply.
The ALMxIF flags control when the MFP is asserted, as
described in the following sections.
5.5.2.1 Single Alarm Operation
When only one alarm module is enabled, the MFP output
is based on the corresponding ALMxIF flag and the
ALMPOL flag. If ALMPOL = 1, the MFP output reflects
the value of the ALMxIF flag. If ALMPOL = 0, the MFP
output reflects the inverse of the ALMxIF flag (Table 5-9).
TABLE 5-9: SINGLE ALARM OUTPUT
TRUTH TABLE
5.5.2.2 Dual Alarm Operation
When both alarm modules are enabled, the MFP out-
put is determined by a combination of the ALM0IF,
ALM1IF, and ALMPOL flags.
If ALMPOL = 1, the ALM0IF and ALM1IF flags are
OR’d together and the result is output on MFP. If
ALMPOL = 0, the ALM0IF and ALM1IF flags are AND’d
together, and the result is inverted and output on MFP
(Table 5-10). This provides the user with flexible
options for combining alarms.
TABLE 5-10: DUAL ALARM OUTPUT
TRUTH TABLE
5.5.3 GENERAL PURPOSE OUTPUT
MODE
If the square wave clock output and both alarm mod-
ules are disabled, the MFP acts as a general purpose
output. The output logic level is controlled by the OUT
bit.
The general purpose output is not available when
operating from the backup power supply.
Note: All of the clock output rates are affected by
digital trimming except for the 1:1
postscaler value (SQWFS<1:0> = 00).
SQWFS<1:0> Postscaler
Nominal
Frequency
00 1:1 32.768 kHz
01 1:4 8.192 kHz
10 1:8 4.096 kHz
11 1:32,768 1 Hz
Note 1: Nominal frequency assumes F
OSC is
32.768 kHz.
ALMPOL ALMxIF
(1)
MFP
001
010
100
111
Note 1: ALMxIF refers to the interrupt flag corre-
sponding to the alarm module that is
enabled.
Note: If ALMPOL = 0 and both alarms are
enabled, the MFP will only assert when
both ALM0IF and ALM1IF are set.
ALMPOL ALM0IF ALM1IF MFP
0001
0011
0101
0110
1000
1011
1101
1111