参数资料
型号: TSC80C31-16KAD
厂商: ATMEL CORP
元件分类: 微控制器/微处理器
英文描述: 8-BIT, 16 MHz, MICROCONTROLLER, PDIP40
封装: PLASTIC, DIP-40
文件页数: 16/83页
文件大小: 8336K
代理商: TSC80C31-16KAD
17
8021G–AVR–03/11
ATmega329P/3290P
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.
When using the SEI instruction to enable interrupts, the instruction following SEI will be exe-
cuted before any pending interrupts, as shown in this example.
6.8.1
Interrupt Response Time
The interrupt execution response for all the enabled AVR interrupts is four clock cycles mini-
mum. After four clock cycles the program vector address for the actual interrupt handling routine
is executed. During this four clock cycle period, the Program Counter is pushed onto the Stack.
The vector is normally a jump to the interrupt routine, and this jump takes three clock cycles. If
an interrupt occurs during execution of a multi-cycle instruction, this instruction is completed
before the interrupt is served. If an interrupt occurs when the MCU is in sleep mode, the interrupt
execution response time is increased by four clock cycles. This increase comes in addition to the
start-up time from the selected sleep mode.
A return from an interrupt handling routine takes four clock cycles. During these four clock
cycles, the Program Counter (two bytes) is popped back from the Stack, the Stack Pointer is
incremented by two, and the I-bit in SREG is set.
Assembly Code Example
in
r16, SREG
; store SREG value
cli
; disable interrupts during timed sequence
sbi
EECR, EEMWE
; start EEPROM write
sbi
EECR, EEWE
out
SREG, r16
; restore SREG value (I-bit)
C Code Example
char
cSREG;
cSREG = SREG; /* store SREG value */
/* disable interrupts during timed sequence */
__disable_interrupt();
EECR |= (1<<EEMWE); /* start EEPROM write */
EECR |= (1<<EEWE);
SREG = cSREG; /* restore SREG value (I-bit) */
Assembly Code Example
sei
; set Global Interrupt Enable
sleep
; enter sleep, waiting for interrupt
; note: will enter sleep before any pending
; interrupt(s)
C Code Example
__enable_interrupt(); /* set Global Interrupt Enable */
__sleep(); /* enter sleep, waiting for interrupt */
/* note: will enter sleep before any pending interrupt(s) */
相关PDF资料
PDF描述
TSC80C31-40JDB 8-BIT, 40 MHz, MICROCONTROLLER, PQFP44
TSC80C31-12LFR 8-BIT, 12 MHz, MICROCONTROLLER, PQFP44
TSC80C31-20LFD 8-BIT, 20 MHz, MICROCONTROLLER, PQFP44
TSC80C31-36KB 8-BIT, 36 MHz, MICROCONTROLLER, PQCC44
TS87C51RD2-VLMR 8-BIT, OTPROM, 40 MHz, MICROCONTROLLER, PQFP64
相关代理商/技术参数
参数描述
TSC80C31-16MA 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 44 MHz Single-Chip 8 Bit Microcontroller
TSC80C31-16MAB/883 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 44 MHz Single-Chip 8 Bit Microcontroller
TSC80C31-16MAD/883 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 44 MHz Single-Chip 8 Bit Microcontroller
TSC80C31-16MAR/883 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 44 MHz Single-Chip 8 Bit Microcontroller
TSC80C31-16MAR/P883 制造商:TEMIC 制造商全称:TEMIC Semiconductors 功能描述:CMOS 0 to 44 MHz Single-Chip 8 Bit Microcontroller