This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:avr:external_interrupts [2010/03/04 15:26] – yllars | en:avr:external_interrupts [2020/07/20 09:00] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== External | + | ====== External |
- | External interrups are one of the most simple peripheral functions. AVRs typically | + | External interrups are one of the most simple peripheral functions. |
- | To use an external interrupt, the pin has to be configured as standard IO input (it can also be used as an output, but in this case the interrupt can only be created by the controller itself). It is necessary to allow receiving interrupts and specify the condition that causes the interrupt to fire in the external interrupt configuration register. There are four possible conditions: | + | To use an external interrupt, the pin has to be configured as a standard IO input (it can also be used as an output, but in this case the interrupt can only be created by the controller itself). It is necessary to allow receiving interrupts and specify the condition that causes the interrupt to fire in the external interrupt configuration register. There are four possible conditions: |
* Logical zero (voltage of 0V) | * Logical zero (voltage of 0V) | ||
Line 11: | Line 11: | ||
- | When the mode is set to logical zero, the interrupt will fire continuously as long as the pin has a value of zero. The execution of the main program is stopped | + | When the mode is set to logical zero, the interrupt will fire continuously as long as the pin has a value of zero. During this period the execution of the main program is stopped. |
- | Grouped by principal, there are two types of interrupts: synchronized to the controller' | + | Grouped by principle, there are two types of interrupts: synchronized to the controller' |
- | ~~PB~~ | + | < |
<box 100% round # | <box 100% round # | ||
Line 56: | Line 56: | ||
</ | </ | ||
- | In addition to interrupts fired by single pins, it is possible to use entire groups of pins to fire logical value change interrupts, if the AVR has enough pins. These interrupts are simply called pin change interrupts. They fire when the value of at least one pin in the group is changed. | + | In addition to interrupts fired by single pins, if the AVR has enough pins it is possible to use entire groups of pins to fire logical value change interrupts. These interrupts are simply called pin change interrupts. They fire when the value of at least one pin in the group is changed. |