TutorialsMicroprocessors-CourseAVR MCU-2 v1.0MCU Sheet [2] - External Interrupts. Build an AVR based system that has 8 LEDs and two push buttons connected to an ATMEGA328 AVR microcontroller. Then write a program to build an up/down binary counter where one push button is used to increment the counter value and the other
is used to decrement the value, and the binary value is displayed on the 8 LEDs.
You must use external interrupts atfalling-edge configuration.
2. Build an AVR based system that has one DC motor and two push buttons connected to an ATMEGA328 AVR microcontroller. Then write a program to move the DC motor when the first button is pressed, and stop it when the second button is pressed. The initial state of the DC motor is stopped.
Useexternal interrupts.
3. Build an AVR based system that has one LED and one push button connected to an ATMEGA328 AVR microcontroller. Then write a program to toggle the LED’s state (ON/OFF) whenever the button is pressed.
Useexternal interrupts.
4.
Repeat problem, but use only one push button to turn the DC motor ON and
OFF (toggle the motor’s state. Build an AVR based system that has one DC motor and two push buttons connected to an ATMEGA328 AVR microcontroller. Then write a program to perform the following. The first button is used to toggle
the state of the DC motor(Moving/Stopped).
2. The second button is used to toggle the direction of the motor
(Right/Left).
Use external interrupts. Hint Use H-Bridge to control the DC motor’sdirection.6. Build an AVR based garage system with 2 gates, each has a sensor that senses whether a car gets in the garage or out of the garage. The garage has a maximum capacity of 15 cars. There're 2 digit segments to show the current free (available) slots in the garage (that should start by 15),
a red LEDto turn on when there's no more free slots available and a green LED to indicate that there are still free slots in the garage- You must use external interrupts (INT and INT) for the sensors- You can use push buttons to simulate the sensor’s behavior.
1 of 1Computer and Systems Engineering [CSE] Dept.