Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Determine miller indices of plane A Z a/2 X a/2 a/2 Y

Answered: 1 week ago

Question

Calculate the lifetime value (LTV) of a loyal customer.

Answered: 1 week ago

Question

Use service tiering to manage the customer base and build loyalty.

Answered: 1 week ago