1.2 External Interrupt Sensing
External interrupts can be sensed and registered either synchronously or asynchronously. Synchronous sensing requires I/O clock whereas asynchronous sensing does not requires I/O clock. This implies that the interrupts that are detected asynchronously can be used for waking the device from sleep modes other than idle mode because the I/O clock is halted in all sleep modes except idle mode.
The sense configuration for external interrupts and pin change interrupts for Atmel ATtiny88 is given in table below. For device specific sense configuration, refer to the respective datasheet.
Program address | Interrupt source | Sensing |
---|---|---|
$001 | INT0 | Asynchronous (level) |
Synchronous (edges) | ||
$002 | INT1 | Asynchronous (level) |
Synchronous (edges) | ||
$003 | PCINT0 | Asynchronous |
$004 | PCINT1 | Asynchronous |
$005 | PCINT2 | Asynchronous |
$006 | PCINT3 | Asynchronous |
From the table above all the pin change interrupts are detected asynchronously. Other interrupts (INT0 and INT1) can be triggered by sensing the rising or falling edges or low level on the corresponding interrupt pins. The type of sensing (edge or level) for each of the INTn (n = 0 and 1 for ATtiny88) interrupts is software configurable using two Interrupt Sense Control (ISC) bits per interrupt. This is provided in the following table.
ISCn1 | ISCn0 | Description |
---|---|---|
0 | 0 | The low level of INTn generates an interrupt request |
0 | 1 | Any edge of INTn generates an interrupt request |
1 | 0 | The falling edge of INTn generates an interrupt request |
1 | 1 | The rising edge of INTn generates an interrupt request |