MT02 ECE2560 Sp
微控制器代写 Use Code Composer Studio and your Launchpad to write and execute one complete assembly language program to perform the following task.
Use Code Composer Studio and your Launchpad to write and execute one complete assembly language program to perform the following task. Use variables in RAM or values in core registers to store temporary values. Make sure to comment your program:
Place an array labeled array in FRAM with the following 16 bit signed decimal elements: ‐2001, ‐1001, ‐551, ‐451, ‐401, ‐601, ‐1600, ‐1401, ‐2501, 498, ‐1251, 248, ‐2001, ‐1101, ‐1401, ‐100
Create a 16 bit variable named average in RAM with an initial value of 0 Your program as usual should go in the .text region. Use core registers for array indices. Don’t use registers R0, R2, R3 or R4, since they are used internally by the runtime.
Use two for‐loops (alternate implementation, page 15, lesson 11) to calculates the average of all the elements of the array and store the average value in the variable named average. It is a requirement that you use the structure of the for‐loop (alternate implementations) as described in lesson 11.
Use the indexed addressing mode to access the elements of the array. Use the register addressing mode to access the values stored in the core registers. Use the absolute addressing mode to access the values stored in variables. Use immediate addressing mode for constants and literals. Your program should be complete following all the practices taught in the class. Review Quiz02, Quiz3 and Midterm01 and go through the posted solutions of these assignments.
Use the word template and instructions contained on our web site to submit your screenshots to Carmen. Do not email directly to your TA or me. Files emailed to the TA or me will not be accepted.
Include the following in your submission: 微控制器代写
i) Assembly language source code
ii) Screenshot of the “General” tab of the properties screen of your project. Note: In CCS, right click on your project folder in “project browser” and choose “properties” to get to the properties screen.
iii) Screenshots of the memory browser showing array and average (after the task has been executed). Use “16‐bit Signed Int” format in the memory browser to display the values in the memory as signed decimal numbers. See the posted solution to Quiz02 for instructions to take screenshots. In particular, run your program, then suspend (pause) the program, and then take the screenshot of the memory browser.