Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q: Write, simulate, and demonstrate using AVRStudio6/7 an assembly code for the AVR ATMEGA328p microcontroller that performs the following functions: 1. Store 99 numbers starting

Q: Write, simulate, and demonstrate using AVRStudio6/7 an assembly code for the AVR ATMEGA328p microcontroller that performs the following functions: 1. Store 99 numbers starting from the STARTADDS=0x0200 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 99 numbers that are greater than 10 and less than 255. The numbers can be consecutive or random numbers. 2. Use X/Y/Z register addressing to parse through the 99 numbers, if the number is divisible by 3 store the number starting from memory location 0x0400, else store at location starting at 0x0600. 3. Use X/Y/Z register addressing to simultaneously add numbers from memory location 0x0400 and 0x0600 and store the sums at R16:R17 and R18:R19 respectively. Pay attention to the carry overflow. 4. Verify your algorithm and answers using C or any high-level program. 5. Determine the execution time @ 16MHz/#cycles of your algorithm using the simulation.

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

Database Concepts International Edition

Authors: David M. Kroenke

6th Edition International Edition

0133098222, 978-0133098228

More Books

Students also viewed these Databases questions

Question

Prove that if |f(x)| Then lim g(x) = 0. lim f(x)g(x) = 0.

Answered: 1 week ago

Question

11.5 Identify effective decision-making techniques.

Answered: 1 week ago

Question

What information is relevant to solve this problem and why?

Answered: 1 week ago