Question: a new Q: Write, simulate, and demonstrate using Microchip Studio7 an assembly code for the AVR ATMEGA328pb microcontroller that performs the following functions: 1. Write

 a new Q: Write, simulate, and demonstrate using Microchip Studio7 an

a new Q: Write, simulate, and demonstrate using Microchip Studio7 an assembly code for the AVR ATMEGA328pb microcontroller that performs the following functions: 1. Write program to store 112 numbers starting from the STARTADDS=0x0400 location (SRAM). Populate the value of the memory location by adding high(STARTADDS) and low(STARTADDS). Use the X registers as pointers to fill up 112 consecutive numbers starting from 33. If the number is odd store the number starting from memory location 0x0500, if the number is even store the number starting from memory location Ox0600. Store the sum of all odd and even numbers in R18-R16 and R21-R19 respectively. Store R22=112 and R23=33. a) Use Y and Z registers to store and perform computation of the odd and even numbers. b) Pay attention to the 8-bit carry overflow. c) Verify your algorithm and answers using C code equivalent to the assembly program. a new Q: Write, simulate, and demonstrate using Microchip Studio7 an assembly code for the AVR ATMEGA328pb microcontroller that performs the following functions: 1. Write program to store 112 numbers starting from the STARTADDS=0x0400 location (SRAM). Populate the value of the memory location by adding high(STARTADDS) and low(STARTADDS). Use the X registers as pointers to fill up 112 consecutive numbers starting from 33. If the number is odd store the number starting from memory location 0x0500, if the number is even store the number starting from memory location Ox0600. Store the sum of all odd and even numbers in R18-R16 and R21-R19 respectively. Store R22=112 and R23=33. a) Use Y and Z registers to store and perform computation of the odd and even numbers. b) Pay attention to the 8-bit carry overflow. c) Verify your algorithm and answers using C code equivalent to the assembly program

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!