English
Language : 

PIC18F44J50-I Datasheet, PDF (241/562 Pages) Microchip Technology – 28/44-Pin, Low-Power, High-Performance USB Microcontrollers
PIC18F46J50 FAMILY
17.3 Alarm
The alarm features and characteristics are:
• Configurable from half a second to one year
• Enabled using the ALRMEN bit (ALRMCFG<7>,
Register 17-4)
• Offers one-time and repeat alarm options
17.3.1 CONFIGURING THE ALARM
The alarm feature is enabled using the ALRMEN bit.
This bit is cleared when an alarm is issued. The bit will
not be cleared if the CHIME bit = 1 or if ALRMRPT  0.
The interval selection of the alarm is configured
through the ALRMCFG bits (AMASK<3:0>). (See
Figure 17-5.) These bits determine which and how
many digits of the alarm must match the clock value for
the alarm to occur.
The alarm can also be configured to repeat based on a
preconfigured interval. The number of times this occurs
after the alarm is enabled is stored in the ALRMRPT
register.
Note:
While the alarm is enabled (ALRMEN = 1),
changing any of the registers, other than
the RTCCAL, ALRMCFG and ALRMRPT
registers, and the CHIME bit, can result in
a false alarm event leading to a false alarm
interrupt. To avoid this, only change the
timer and alarm values while the alarm is
disabled (ALRMEN = 0). It is recom-
mended that the ALRMCFG and
ALRMRPT registers, and CHIME bit be
changed when RTCSYNC = 0.
FIGURE 17-5:
ALARM MASK SETTINGS
Alarm Mask Setting
AMASK<3:0>
0000 – Every half second
0001 – Every second
Day of the
Week Month
Day
0010 – Every 10 seconds
0011 – Every minute
0100 – Every 10 minutes
0101 – Every hour
0110 – Every day
0111 – Every week
d
1000 – Every month
1001 – Every year(1)
dd
mm d d
Note 1: Annually, except when configured for February 29.
Hours Minutes Seconds
s
ss
m
mm
ss
ss
h h mm s s
h h mm s s
h h mm s s
h h mm s s
 2011 Microchip Technology Inc.
DS39931D-page 241