Interrupt in AVR Atmega32A Microcontroller

This tutorial is about how to use interrupt in AVR Atmega32A microcontroller. Interrupt enhances a use of microcontroller in many different ways. Interrupt is exactly the same as it means in English. Normally we expect a program to keep on executing sequentially in the way we have defined. When interrupt occurs the normal flow of instruction is temporarily suspended and interrupts service routine (ISR) related function or event is executed by program so basically whenever interrupt occurs in our program, we stop current task and handle the event then resume program flow back where we left off.
Interrupt in AVR Atmega32A Microcontroller
Interrupt in AVR Atmega32A Microcontroller is either software or hardware. There are in total 21 different interrupt vectors available (for more detail about their address and definition please follow datasheet page no: 43). External interrupts are triggered by INT0, INT1, INT2 pins. In this tutorial will be covering software interrupt. As in our previous post, we have seen timer and counter so let’s write interrupt driven program. In which we will be using 16-bit Timer/Counter1 register.
This is one of classic example to keep tutorial short and simple. Let’s hook up green LED and a current limiting resistor of 330Ω to PB0 pin of microcontroller. In this example, we will generate interrupt to toggle LED after every second. Please follow video for more detail about code.
Interrupt in AVR Atmega32A Microcontroller Schematic
Read More: Interrupt in AVR Atmega32A Microcontroller

Related Post

Be the first to comment

Leave a Reply

Your email address will not be published.


*


*
= 4 + 2

Read previous post:
Prosthetics Feeling Is Now Possible With This Implantable Chip By Imec

Imec, the world-leading research and innovation hub in nano-electronics and digital technology, announced last month its prototype implantable chip that...

Close