Starting from:
$28

$18.20

[SOLVED] CMPE453, Section-2 Lab-5 Interrupt Handling using Atmega328p Microcontroller

The purpose of thislab activity isto understand the mechanism of interrupt handling by the microcontroller. Hardware Requirements 1) Arduino Uno Board 2) Breadboard 3) Push Button 4) LED with Resistor (suitable resistance rating) 5) Connecting wires Hardware Setup 1) Assume you have 1 pushbutton (PB1). 2) Connect Push Button with the pin INT0 of microcontroller in such a way that pressing it should generate voltage level “LOW” at the pin. 3) Now connect LED with other general purpose I/O Pins Of microcontroller. Software Setup In the software you are required to do the following. 1. Configure the pin INT0 as an input pin with Internal PULL UP resistor enabled. 2. Write the Interrupt Initialization Routine which performs the followings: a. Enable the global interrupts (sei(); or set the I bit of SREG) b. Enable INT0 interrupt (set the corresponding bits of EIMSK Register) c. Set the corresponding bits of EICRA register to enable LOW Level Interrupt on INT0 3. In the while loop, write the code that Toggle the LEDs after every 3 seconds. 4. Write the ISR for Push Button such that when it is pressed, it should toggle LED 4 times at an interval of 1 sec.