30
ATmega103(L)
0945G–09/01
request even if the pin is enabled as an output. This provides a way of generating a soft-
ware interrupt. When enabled, a level-triggered interrupt will generate an interrupt
request as long as the pin is held low.
External Interrupt Flag
Register – EIFR
• Bits 7..4 – INTF7 - INTF4: External Interrupt 7 - 4 Flags
When an edge on the INT7 - INT4 pins triggers an interrupt request, the corresponding
interrupt flag, INTF7 - INTF4, becomes set (one). If the I-bit in SREG and the corre-
sponding interrupt enable bit, INT7 - INT4 in EIMSK, is set (one), the MCU will jump to
the interrupt vector. The flag is cleared when the corresponding interrupt routine is exe-
cuted. Alternatively, the flag is cleared by writing a logical “1” to it. These flags are
always cleared when INTF7 - INFT4 are configured as level interrupts.
• Bits 3..0 – Res: Reserved Bits
These bits are reserved bits in the ATmega103(L) and always read as zero.
External Interrupt Control
Register – EICR
• Bits 7..0 – ISCX1, ISCX0: External Interrupt 7 - 4 Sense Control Bits
The External Interrupts 7 - 4 are activated by the external pins INT7 - INT4 if the SREG
I-flag and the corresponding interrupt mask in the EIMSK are set. The level and edges
on the external pins that activate the interrupts are defined in Table 9.
The value on the INTX pin is sampled before detecting edges. If edge interrupt is
selected, pulses that last longer than one CPU clock period will generate an interrupt.
Shorter pulses are not guaranteed to generate an interrupt. Observe that CPU clock fre-
quency can be lower than the XTAL frequency if the XTAL divider is enabled. If low-level
interrupt is selected, the low level must be held until the completion of the currently exe-
cuting instruction to generate an interrupt. If enabled, a level-triggered interrupt will
generate an interrupt request as long as the pin is held low.
Bit
7
6
5
4
3
2
1
0
$38 ($58)
INTF7
INTF6
INTF5
INTF4
–
–
–
–
EIFR
Read/Write
R/W
R/W
R/W
R/W
R
R
R
R
Initial Value
0
0
0
0
0
0
0
0
Bit
7
6
5
4
3
2
1
0
$3A ($5A)
ISC71
ISC70
ISC61
ISC60
ISC51
ISC50
ISC41
ISC40
EICR
Read/Write
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
Table 9.
Interrupt Sense Control
ISCX1
ISCX0
Description
0
0
The low level of INTX generates an interrupt request.
0
1
Reserved
1
0
The falling edge of INTX generates an interrupt request.
1
1
The rising edge of INTX generates an interrupt request.