Question: Please write the code in AVR (.asm) assembly. The microcontroller we are using is the ATMega328p. The Oscilloscope is the Tektronix MDO3104 Mixed Domain Oscillosope.
3 Procedure 3.1 Delay subroutine Write a procedure that takes a number n in R16 and generates a delay 0.0001n sec. 3.2 Testing using switches Write a code that will continuously take a three-bit number m from the switches and generate a pulse-wave output on a selected pin. The pulse-wave will have a period of 0.02 Sec. The width of the pulse with respect to m is defined according to this table m Pulse-width (Sec) 0 0.0005 0,001 0,0013 0,0017 0,002 0,004 0,008 0.012 Connect the output of the pin to the oscilloscope and check if the output is correct Hin Utilize the subroutine from the previous step 3.3 LED Output Instead of the oscilloscope, connect the output to a LED circuit and check the results 3 Procedure 3.1 Delay subroutine Write a procedure that takes a number n in R16 and generates a delay 0.0001n sec. 3.2 Testing using switches Write a code that will continuously take a three-bit number m from the switches and generate a pulse-wave output on a selected pin. The pulse-wave will have a period of 0.02 Sec. The width of the pulse with respect to m is defined according to this table m Pulse-width (Sec) 0 0.0005 0,001 0,0013 0,0017 0,002 0,004 0,008 0.012 Connect the output of the pin to the oscilloscope and check if the output is correct Hin Utilize the subroutine from the previous step 3.3 LED Output Instead of the oscilloscope, connect the output to a LED circuit and check the results
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
