Changeset 175 for rtos_arduino/trunk/arduino_lib/libraries/RTC/examples/ALARM_interrupt/ALARM_interrupt.ino
- Timestamp:
- Mar 28, 2016, 2:09:46 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rtos_arduino/trunk/arduino_lib/libraries/RTC/examples/ALARM_interrupt/ALARM_interrupt.ino
r136 r175 3 3 This mode is more conveniently because you use processor for other tasks and when alarm match occurs interrupt routine is executed. 4 4 In this way, alarm flag checking is indipendent from main program flow. 5 6 NOTE: for M0/M0 pro only you can select the oscillator source for count. 7 If you want to use a low power oscillator use rtc.begin(TIME_H24, LOW_POWER); function. 8 If you want to use a more accurate oscillator use rtc.begin(TIME_H24, HIGH_PRECISION); function. 5 9 ******************************************************************************************************************************************************************************/ 6 10 … … 18 22 rtc.setDate(13,8,15); //setting date 19 23 rtc.enableAlarm(SEC,ALARM_INTERRUPT,alarm_int); //enabling alarm in polled mode and match on second 20 rtc. local_time.hour=17;21 rtc. local_time.minute=5;22 rtc. local_time.second=10; //setting second to match24 rtc.time.hour=17; 25 rtc.time.minute=5; 26 rtc.time.second=10; //setting second to match 23 27 rtc.setAlarm(); //write second in alarm register 24 28 }
Note:
See TracChangeset
for help on using the changeset viewer.