Create a program to compute the average of an array of 32


Problem

1. Write a program to compute the average of an array of 32 8-bit elements. The array is stored immedately after your program with the name of arrayl. Store the sum (two bytes) and average in data memory 0x00-0x01 and 0x02, respectively. Use the simulator to simulate the program. Hint: Divide-by-32 can be implemented by shifting to the right by five places.

2. Write a program to count the number of elements that are greater than 30 in an array of n 8-bit elements using the for i = nl to n2 do looping construct. Debug the program using the ICD2 and the demo board. Open a Watch window to view the result.

 

Request for Solution File

Ask an Expert for Answer!!
Other Engineering: Create a program to compute the average of an array of 32
Reference No:- TGS02668422

Expected delivery within 24 Hours