Summary of How to use internal ADC of AVR microcontroller using interrupts
This article continues the discussion on AVR interrupts, focusing specifically on internal interrupts generated by peripherals like timers and ADCs. It details how to enable these interrupts using specific bits (ADIE) in registers like ADCSRA and the global interrupt enable bit (I-bit) in SREG. The text explains the advantages of using ADC interrupts over polling for efficient multitasking. Additionally, it describes auto-triggering modes where the ADC automatically starts a new conversion upon completion, configured via the ADATE and ADTS bits.
Parts used in the AVR Internal Interrupts Project:
- AVR Microcontroller
- ADC Peripheral
- Timer Peripheral
- ADCSRA Register
- SREG Status Register
- SFIOR Register
This article is in continuation to AVR interrupts. There are two types of interrupts external and internal in AVR microcontroller. The aforesaid article covers external interrupts. AVR microcontrollers have seventeen internal interrupts. These internal interrupts are generated by the internal peripherals of Microcontroller like Timer, ADC etc. The internal interrupts are used for efficient operation of the internal peripherals. This article explains the internal interrupts using the example of an ADC interrupt.
- What are the two types of interrupts in an AVR microcontroller?
The two types are external interrupts and internal interrupts. - How many internal interrupts do AVR microcontrollers have?
AVR microcontrollers have seventeen internal interrupts. - Which bit activates global interrupts in the SREG register?
Bit 7, known as the I bit or Global interrupt Enable, must be set to high. - What command is used to enable global interrupts?
The sei command is used to enable global interrupts. - Why is the interrupt method preferred over polling for ADC?
The interrupt method allows the microcontroller to perform other tasks while waiting for conversion. - Which bit enables ADC interrupts in the ADCSRA register?
The ADIE bit in the ADCSRA register enables ADC interrupts. - How does auto-triggering mode work for ADC?
In auto-triggering mode, the ADSC bit is automatically cleared after conversion and set high again for the next conversion. - Which bit activates the auto-triggering mode in the ADCSRA register?
The ADATE bit in the ADCSRA register activates auto-triggering mode. - Where are the ADC triggering options selected?
Various triggering options are selected by configuring the ADTS bits in the SFIOR register.


