Sets the alarm time of the Real Time Clock and Calendar (RTCC) by writing a value into the Alarm Time Value Register (ALRMTIME).
Note: that 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.
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.
void RTCC.setAlarmTime(unsigned long alTime)
- alTime = the alarm time to be set in 24 hour clock and BCD format (see below).
The format for the data in alTime is 0xhhmmss00 using a 24 hour clock, where :-
- hh is the hour in 24 hour format, i.e. 00 - 24,
- mm is the minutes, i.e. 00 - 59,
- ss is the seconds, i.e. 00 - 59,
i.e. if an alarm time of 2:35:25 pm is to be set then AlTime = 0x14352500
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.