| Datenblatt-Suchmaschine für elektronische Bauteile |
|
SH7708 Datenblatt(PDF) 354 Page - Renesas Technology Corp |
|
|
|||||||||||||||||||||||||||||
SH7708 Datenblatt(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 |
|
Link URL |
| War ALLDATASHEET hilfreich? [ DONATE ] |
Über Alldatasheet | Werbung | Kontakt | Privatsphäre und Datenschutz | Link zum Datenblatt | Linktausch | Hersteller 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 |