Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q1. Write down C programs and demonstrate the code for your ATmega328P XPlained mini kit so that it performs the following functions: (A) Initiate 2
Q1. Write down C programs and demonstrate the code for your ATmega328P XPlained mini kit so that it performs the following functions: (A) Initiate 2 switches SW1 and SW2 as input and 8 LEDs of port D as output. Write down the code to set up the blinking frequency of the 3rd LED to 3Hz and rest of the LEDs should be turned off. (B) Extend the Task A so that blinking frequency of LED will be increased by 1 Hz if the switch SW1 is pressed and blinking frequency will be decreased by 1Hz if the switch SW2 is pressed. (C) Modify code to change the position of the blinking LED if both SW1 and SW2 switches are pressed at a time. The position of the blinking LED should go left to right initially. After it goes to gth position the direction will be reversed. Once it goes to 1st position the direction will be reversed again. The process will be repeated. The position of the LED will be changed as in the Table. (D) Implement this task using both non-debounced and debounced switch. Q1. Write down C programs and demonstrate the code for your ATmega328P XPlained mini kit so that it performs the following functions: (A) Initiate 2 switches SW1 and SW2 as input and 8 LEDs of port D as output. Write down the code to set up the blinking frequency of the 3rd LED to 3Hz and rest of the LEDs should be turned off. (B) Extend the Task A so that blinking frequency of LED will be increased by 1 Hz if the switch SW1 is pressed and blinking frequency will be decreased by 1Hz if the switch SW2 is pressed. (C) Modify code to change the position of the blinking LED if both SW1 and SW2 switches are pressed at a time. The position of the blinking LED should go left to right initially. After it goes to gth position the direction will be reversed. Once it goes to 1st position the direction will be reversed again. The process will be repeated. The position of the LED will be changed as in the Table. (D) Implement this task using both non-debounced and debounced switch
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started