Question: We have to use AVR assembly code for ATmega328p Microcontroller The goal of this assignment is to boot in MICROCHIP STUDIO and conduct mathematical operations

 We have to use AVR assembly code for ATmega328p Microcontroller The

We have to use AVR assembly code for ATmega328p Microcontroller

The goal of this assignment is to boot in MICROCHIP STUDIO and conduct mathematical operations using the ATMega328p microcontroller. Given two integers A(00A) and B(006), a program is to be written that does the following: - Add the two numbers and store the result N in 00300. - Flash the onboard LED (PB5) N times with a frequency of 2flash/sec - Wait 5 seconds - Subtract the second number from the first and store the result M in 0x0301 - Flash the onboard LED (PB5) M times with a frequency of 1flash/sec - Wait 5 seconds - End the program, or loop back to the beginning Provide a detailed flowchart in Microsoft Word, and write an assembly language program in MicroChip Studio, using the ".asm format, to implement the above control scheme. To realize the timing control, you can choose one of the following options (1) Using the loop delay subroutine programmed in the last lab, or (2) Using embedded timer(s) and timer registers (You will get 5 extra points by selecting this option) Please submit the following items

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!