avr定时中断
Interrupts are basically events that require intermediate attention by the microcontroller. When an interrupt event occurs the microcontroller pauses its current task and attend to the interrupt by executing an interrupt service. After this, the microcontroller returns to the initial task that it had paused and continue its normal operation.
中断基本上是需要微控制器中间注意的事件。 当发生中断事件时,微控制器暂停其当前任务,并通过执行中断服务来处理中断。 此后,微控制器返回到已暂停的初始任务,并继续其正常操作。
Now we would create a program in which we would use Interrupt, now we have to write our code such that one bulb keeps blinking with the time interval of 2 sec and we would use another LED bulb such that when the button is pressed the bulb starts to glow and when the button is off stops glowing. The first LED should be keeping on blinking while performing this process.
现在,我们将