Sets the alarm of the Real Time Clock and Calendar (RTCC) to occur when the value of the hours and the minutes and the seconds in the RTC Time Value Register (RTCTIME) and the value of the month and the day (of the month) in the RTC Date Value Register (RTCDATE) matches the value of the hours and the minutes and the seconds in the Alarm Time Value Register (ALRMTIME) and the value of the month and the day (of the month) in the Alarm Date Value Register (ALRMDATE). In this instance the other values in the RTCDATE and ALRMDATE Registers have no effect on the operation of the alarm.
If the alarm time and alarm date are set for, say, 23:12:14 Saturday 21 January then, subject to the other alarm settings, the alarm will occur every time the day, the hours, minutes and seconds are 23:12:14 and it is 21 Janaury, i.e. at 23:12:14 on the 21st January of the year - in other words once every year except if the alarm is set to occur on 29 February when it will occur once every 4 years.
Details of the which parts of the RTCTIME and RTCDATE Registers are compared with the ALRMTIME and ALRMDate Registers for the various alarmRepeat periods can be found in Figure 29-7: Alarm Mask Settings of the Microchip PIC32 Family Reference Manual, Section 29. Real-Time Clock and Calendar (RTCC) (see below).
Note 1: The various RTCC.RepeatAlarmEvery~ functions are mutually exclusive and the alarm operation is determined by the last such function used, i.e. if the RTCC.RepeatAlarmEveryHour function is used followed by RTCC.RepeatAlarmEveryDay function then the alarm occurs every day as the effect of the earlier function (RTCC.RepeatAlarmEveryHour) is overwritten by the later function (RTCC.RepeatAlarmEveryDay).
Note 2: The behaviour of the RTCC Alarm is dependent not only on the values in the Alarm Time Value Register (ALRMTIME) and in the Alarm Date Value Register (ALRMDATE) but also the values in the RTC Alarm Control Register (RTCALRM) which are determined by other settings including the various RTCC.AlarmRepeat~ functions.
Note 3: Only works for 32-bit Pinguinos with a 32,768 kHz quartz crystal which allows the use of the built-in RTCC functionality of the PIC32, such as the Olimex PIC32 Pinguino OTG.
Details of the RTCC functionality can be found in the Microchip PIC32 Family Reference Manual, Section 29. Real-Time Clock and Calendar (RTCC) which can be downloaded from Resources and Support on the Microship website for their 32-bit microcontrollers.