| Electronic Components Datasheet Search |
|
AN1216 Datasheet(PDF) 5 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1216 Datasheet(HTML) 5 Page - STMicroelectronics |
|
5 / 11 page ![]() DocID007016 Rev 2 5/11 AN1216 11 Alarm update management When the alarm signal is generated by the TIMEKEEPER® device, it is communicated to the MCU. The MCU can monitor for this event either by polling, or by using interrupts. There are two variants of each method: Polling – Read the flag register and check the AF bit (bit 6 of the register at offset 7FF0h) – Output the alarm signal on the TIMEKEEPER® IRQ pin (pin 40), and read it on the MCU I/O port Interrupts – Give priority to processing the alarm interrupt – The alarm signal is used to cause a wake-up event The last option is ideally suited when power consumption is the critical issue. For instance, when measuring, processing and storing some metering data every three minutes, the MCU can stay in its standby state for 95% of the time, and only run at full speed, with high power consumption, during the other 5% of the time. The other interrupt option is ideally suited when service time is the critical issue. The MCU will be interrupted from whatever processing it was currently engaged in, to service the alarm event. This can be integrated into a hierarchy of prioritized interrupts. The two polling options are equally suited when the MCU needs to run at full speed, and full power, all of the time, executing important background work, only responding to the alarm event when it has nothing else to do. In polling method, the MCU is always running full speed and full power consumption. In this case, the application power consumption is not a key issue and/or the process to be executed due to an alarm which has no priority. The alarm check and update is served as every other application routine. The TIMEKEEPER IRQ pin (pin 40) is an active-low signal. In the following program, a routine “Update_Next_Alarm” is provided to take care of the periodic update of the alarm parameters. The program has been written in ANSI C, and has been compiled and tested with an M68HC11 series MCU. /* TIMEKEEPER ; M48T37V/Y PERIODIC ALARM SOURCE CODE : */ /* Version: 1.01 */ /*********************************************************************************/ /* Copyright (c) 1999 STMicroelectronics. */ /* */ /* This program is provided “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER */ /* EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTY */ /* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK */ Alarm minute 0-59 00-3B 0-59 Alarm hour 0-12 00-0B 0-12 Table 4. TIMEKEEPER® data format Data C language type Int (integer) decimal Char (character) hexadecimal Char (character) BCD |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |