![codevision wizard codevision wizard](https://img.informer.com/p9/codevisionavr-v3.3-main-window-display.png)
After that, the execution of program continues as usual from the point where it wasstopped. While theMCU is executing a program, if there is something that needs immediate attention, an interrupt isgenerated by that task and the execution of the current program is left at that time and interrupt ishandled. This is exactly what an interrupt does in MCU. The concept of an interrupt in reference to microcontrollersis similar to our daily life concept of interrupts: suppose you are reading this tutorial and suddenlyyour mobile rings - what you do is you stop reading for a while and attend the phone call, and thenresume reading from where you left it. This is a fancy wayof saying that the timers are separate circuits on the AVR chip which can run independent of themain program, interacting via the control and count registers, and something called timerinterrupts.WHAT IS AN INTERRUPT?Prior to learning about timers you need to know the concept of interrupt because timers mainlyinteract with CPU through interrupts.
![codevision wizard codevision wizard](https://fajarrukmo.files.wordpress.com/2011/12/compare1.jpg)
And this operation does not need CPU’s intervention.The AVR timers are very useful as they run asynchronous to the main AVR core. But this register has amagical property - its value increases/decreases automatically at a predefined rate (supplied byuser). So an8 bit timer is 8 bits wide, and is capable of holding value within 0-255. Timers generally have a resolution of 8 or 16 bits. AVR timers do a similar job, measuring a given time interval.An AVR timer in simplest term is a register. A simple clock will time theseconds, minutes and hours elapsed in a given day - or in the case of a twelve hour clock, since thelast half-day. MICROCONTROLLER TUTORIAL IITIMERSWHAT IS A TIMER?We use timers every day - the simplest one can be found on your wrist.