Question: Q: Write, simulate, and demonstrate using AVRStudio7 an assembly code for the AVR ATMEGA328p microcontroller that performs the following functions 1. Store 200 numbers starting

 Q: Write, simulate, and demonstrate using AVRStudio7 an assembly code for

Q: Write, simulate, and demonstrate using AVRStudio7 an assembly code for the AVR ATMEGA328p microcontroller that performs the following functions 1. Store 200 numbers starting from the STARTADDS=Ox0300 location. Populate the value of the memory location by adding high(STARTADDS) and low(STARTADDS). Use the X/Y/Z registers as pointers to fill up 200 numbers that are greater than 25 and less than 226. The numbers can be consecutive or random numbers. 2. Use X/Y/Z register addressing to parse through the 200 numbers, if the number is divisible by 7 store the number starting from memory location Ox0500, if the number is divisible by 3 store the number starting from memory location Ox0600, if they are divisible by both store them at Ox0700, else store at location starting at Ox0800. 3. Use X/Y/Z register addressing to simultaneously add numbers from memory location Ox0500, Ox0600, Ox0700 and Ox0800 and store the sums at R18 R17 R16 and R21 R20:R19 respectively. Pay attention to the carry overflow. Q: Write, simulate, and demonstrate using AVRStudio7 an assembly code for the AVR ATMEGA328p microcontroller that performs the following functions 1. Store 200 numbers starting from the STARTADDS=Ox0300 location. Populate the value of the memory location by adding high(STARTADDS) and low(STARTADDS). Use the X/Y/Z registers as pointers to fill up 200 numbers that are greater than 25 and less than 226. The numbers can be consecutive or random numbers. 2. Use X/Y/Z register addressing to parse through the 200 numbers, if the number is divisible by 7 store the number starting from memory location Ox0500, if the number is divisible by 3 store the number starting from memory location Ox0600, if they are divisible by both store them at Ox0700, else store at location starting at Ox0800. 3. Use X/Y/Z register addressing to simultaneously add numbers from memory location Ox0500, Ox0600, Ox0700 and Ox0800 and store the sums at R18 R17 R16 and R21 R20:R19 respectively. Pay attention to the carry overflow

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!