Four l-byte numbers are stored in memory from addresses


Assume r16 and r17 together hold a 16-bit unsigned integer n between 1and 216-1. Assume the less and more significant bytes of n are initially in r16 and r17,respectively. As in the last problem, write a spin-wait loop that loops n times.

2. Four l-byte numbers are stored in memory from addresses 0x0200 to0x0203. Write an AVR assembly program that counts the number of bits that are 0 ineach of these four bytes and stores the counts for each byte in memory from addresses0x300 to 0x303.In addition to handing in the assembly code, report the following.1) the static instruction count2) the dynamic instruction count3) the number of cycles to execute on an ATmega8

3. Twenty 1-byte numbers are stored in memory starting at address 0x01F5.Write a program in AVR assembly that stores into location 0x01F5+x the sum of theoriginal values from locations 0x01F5 to 0x01F5+x. Do not worry about overflowing.In other words, suppose the first 10 locations initially hold the values 0, 1, 2, 3, 4, 5, 6, 7,8, 9, ......, they become 0, 1, 3, 6, 10, 15, 21, 28, 36, 45, .......In addition to handing in the assembly code, report the following.1) the static instruction count2) the dynamic instruction count3) the number of cycles to execute on an ATmega8

 

Request for Solution File

Ask an Expert for Answer!!
Electrical Engineering: Four l-byte numbers are stored in memory from addresses
Reference No:- TGS0958144

Expected delivery within 24 Hours