| 数据搜索系统,热门电子元器件搜索 |
|
SH7708 数据表(PDF) 354 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
SH7708 数据表(HTML) 354 Page - Renesas Technology Corp |
|
354 / 633 page ![]() 336 12.3.4 Alarm Function Figure 12.4 shows how to use the alarm function. Alarms can be generated using seconds, minutes, hours, day of the week, date, month, or any combination of these. Set the ENB bit (bit 7) in the register on which the alarm is placed to 1, and then set the alarm time in the lower bits. Clear the ENB bit in the register on which the alarm is placed to 0. When the clock and alarm times match, a 1 is set in the AF bit (bit 0) in RCR1. Alarm detection can be checked by reading this bit, but normally it is done by interrupt. If 1 is placed in the AIE bit (bit 3) in RCR1, an interrupt is generated when an alarm occurs. Temporarily disable interrupts (clear AIE bit in RCR1 register to 0) to prevent erroneous interruption Clock running Set alarm time Clear alarm interrupt When interrupts are used, enable interrupts (set AIE bit in RCR1 register to 1) Flag must be reset (by clearing AF bit in RCR1 register to 0) since it was set during alarm time setting Set alarm interrupt Clear alarm flag Monitor alarm time (wait for interrupt or check alarm flag) Figure 12.4 Using the Alarm Function |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |