29
9152BINDCO02/10
ATA8743
When an interrupt occurs, the Global Interrupt Enable I-bit is cleared and all interrupts are dis-
abled. The user software can write logic one to the I-bit to enable nested interrupts. All enabled
interrupts can then interrupt the current interrupt routine. The I-bit is automatically set when a
Return from Interrupt instruction  RETI  is executed.
There are basically two types of interrupts. The first type is triggered by an event that sets the
Interrupt Flag. For these interrupts, the Program Counter is vectored to the actual Interrupt Vec-
tor in order to execute the interrupt handling routine, and hardware clears the corresponding
Interrupt Flag. Interrupt Flags can also be cleared by writing a logic one to the flag bit position(s)
to be cleared. If an interrupt condition occurs while the corresponding interrupt enable bit is
cleared, the Interrupt Flag will be set and remembered until the interrupt is enabled, or the flag is
cleared by software. Similarly, if one or more interrupt conditions occur while the Global Interrupt
Enable bit is cleared, the corresponding Interrupt Flag(s) will be set and remembered until the
Global Interrupt Enable bit is set, and will then be executed by order of priority.
The second type of interrupts will trigger as long as the interrupt condition is present. These
interrupts do not necessarily have Interrupt Flags. If the interrupt condition disappears before the
interrupt is enabled, the interrupt will not be triggered.
When the AVR exits from an interrupt, it will always return to the main program and execute one
more instruction before any pending interrupt is served.
Note that the Status Register is not automatically stored when entering an interrupt routine, nor
restored when returning from an interrupt routine. This must be handled by software.
When using the CLI instruction to disable interrupts, the interrupts will be immediately disabled.
No interrupt will be executed after the CLI instruction, even if it occurs simultaneously with the
CLI instruction. The following example shows how this can be used to avoid interrupts during the
timed EEPROM write sequence..
Assembly Code Example
in  r16, SREG
; store SREG value
cli
; disable interrupts during timed sequence
sbi EECR, EEMPE     start EEPROM write
sbi EECR, EEPE
out SREG, r16
; restore SREG value (I-bit)
C Code Example
char cSREG;
cSREG = SREG; /* store SREG value */
/* disable interrupts during timed sequence */
_CLI();
EECR |= (1</* start EEPROM write */
EECR |= (1<
SREG = cSREG; /* restore SREG value (I-bit) */
相关PDF资料
ATAVRRZ200 KIT DEMO AT86RF230
AV101-12LF ATTENUATOR HIP3 0.70-1GHZ 8-SOIC
AV102-12LF ATTENUATOR HIP3 1.7-2GHZ 8SOIC
AV113-12LF ATTENUATOR HIP3 2.1-2.3GHZ 8SOIC
AXUV100G SENSOR ELECTRON DETECTION
B0205F50200AHF XFRMR BALUN RF 200-500MHZ 1608
B0310J50100AHF XFRMR BALUN RF 300-1000MHZ 0805
B0322J5050AHF XFRMR BALUN RF 300-2200MHZ 0805
相关代理商/技术参数
ATAB5275 功能描述:射频开发工具 LF Tx Antenna driver board (TPMS) RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V
ATAB5276 功能描述:射频开发工具 1A Antenna Driver Demoboard RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V
ATAB5278 功能描述:射频开发工具 LF Tx Antenna driver board (PEG) RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V
ATAB5279 功能描述:射频开发工具 LF Transmitter with ATA5279 RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V
ATAB5282 功能描述:BOARD EVAL LF 125KHZ ANT DVR 3CH RoHS:是 类别:RF/IF 和 RFID >> RFID 评估和开发套件及电路板 系列:Smart RF 产品培训模块:M24LR64 Dual Interface EEPROM 标准包装:1 系列:- 类型:读取器模块 频率:13.56MHz 适用于相关产品:M24LR-64-R 已供物品:2 根基准天线,I2C 和 RFID 读取器,样品 其它名称:497-10480
ATAB5283 功能描述:射频开发工具 LF Rx Board 1 channel (TPMS) RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V
ATAB5423-3-B 功能描述:射频开发工具 UHF Transceiver Base station Board 315MHz RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V
ATAB5423-3-WB 功能描述:射频开发工具 UHF TRx Application Board 315MHz RoHS:否 制造商:Taiyo Yuden 产品:Wireless Modules 类型:Wireless Audio 工具用于评估:WYSAAVDX7 频率: 工作电源电压:3.4 V to 5.5 V