attiny15l ATMEL Corporation, attiny15l Datasheet - Page 19

no-image

attiny15l

Manufacturer Part Number
attiny15l
Description
Attiny15l 8-bit Microcontroller With 1k Byte Flash
Manufacturer
ATMEL Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATTINY15L
Manufacturer:
ATMEL
Quantity:
5 510
Part Number:
ATTINY15L
Manufacturer:
SIEMENS
Quantity:
5 510
Part Number:
attiny15l-1PC
Quantity:
1 670
Part Number:
attiny15l-1PI
Manufacturer:
AIMEL
Quantity:
5 510
Part Number:
attiny15l-1PI
Manufacturer:
VISHAY
Quantity:
5 510
Part Number:
attiny15l-1PI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny15l-1SC
Manufacturer:
ATMEL
Quantity:
3 447
Part Number:
attiny15l-1SC
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny15l-1SI
Manufacturer:
ATMEL
Quantity:
8
Part Number:
attiny15l-1SI
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Part Number:
attiny15l-1SU
Manufacturer:
ATMEL/爱特梅尔
Quantity:
20 000
Interrupt Handling
Interrupt Response Time
The General Interrupt Mask
Register – GIMSK
1187H–AVR–09/07
The ATtiny15L has two 8-bit Interrupt Mask Control Registers: GIMSK (General Inter-
rupt Mask Register) and TIMSK (Timer/Counter Interrupt Mask Register).
When an interrupt occurs, the Global Interrupt Enable I-bit is cleared (zero) and all inter-
rupts are disabled. The user software can set the I-bit (one) to enable interrupts. The I-
bit is set (one) when a Return from Interrupt instruction (RETI) is executed.
When the Program Counter is vectored to the actual Interrupt Vector in order to execute
the interrupt handling routine, hardware clears the corresponding flag that generated the
interrupt. Some of the interrupt flags can also be cleared by writing a logical “1” to the
flag bit position(s) to be cleared.
If an interrupt condition occurs when the corresponding interrupt enable bit is cleared
(zero), the interrupt flag will be set and remembered until the interrupt is enabled, or the
flag is cleared by software.
If one or more interrupt conditions occur when the global interrupt enable bit is cleared
(zero), the corresponding interrupt flag(s) will be set and remembered until the global
interrupt enable bit is set (one), and will be executed by order of priority.
Note that external level interrupt does not have a flag, and will only be remembered for
as long as the interrupt condition is present.
Note that the Status Register is not automatically stored when entering an interrupt rou-
tine and restored when returning from an interrupt routine. This must be handled by
software.
The interrupt execution response for all the enabled AVR interrupts is four clock cycles
minimum. After the four clock cycles the Program Vector address for the actual interrupt
handling routine is executed. During this 4-clock-cycle period, the Program Counter
(nine bits) is pushed onto the Stack. The vector is often a relative jump to the interrupt
routine, and this jump takes two 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.
A return from an interrupt handling routine takes four clock cycles. During these four
clock cycles, the Program Counter (nine bits) is popped back from the Stack. When
AVR exits from an interrupt, it will always return to the main program and execute one
more instruction before any pending interrupt is served.
• Bit 7 – Res: Reserved Bit
This bit is a reserved bit in the ATtiny15L and always reads as zero.
• Bit 6 – INT0: External Interrupt Request 0 Enable
When the INT0 bit is set (one) and the I-bit in the Status Register (SREG) is set (one),
the external pin interrupt is activated. The Interrupt Sense Control0 bits 1/0 (ISC01 and
ISC00) in the MCU general Control Register (MCUCR) define whether the external
interrupt is activated on rising or falling edge, on pin change, or low level of the INT0 pin.
Activity on the pin will cause an interrupt request even if INT0 is configured as an output.
Bit
$3B
Read/Write
Initial Value
R
7
0
INT0
R/W
6
0
PCIE
R/W
5
0
R
4
0
R
3
0
R
2
0
R
1
0
ATtiny15L
R
0
0
GIMSK
19

Related parts for attiny15l