Question: Using AVR Assembler Instruction Try to Explain please EE235 Lab 6 &7 Group Assignment Subject: Subroutine and Subroutine call. Description: Complete part 1 in Lab

Using AVR Assembler Instruction
Try to Explain please
 Using AVR Assembler Instruction Try to Explain please EE235 Lab 6

EE235 Lab 6 &7 Group Assignment Subject: Subroutine and Subroutine call. Description: Complete part 1 in Lab 6 and part 2 and 3 in lab 7. art 1: Write a program that instantiates a 16-bit integer with 1233 (a 4-digit decimal number). then calls a subroutine tester following tasks: 1. Splits the decimal into two equal halves (ie. 12 and 33). (Tips: You will perform a division to do this. Use the div16U subroutine in Chapter 5.) that takes this integer as a parameter. The subroutine performs the 2. Calculates the square of these two halves (ie.calculates 122 and 332). 3. If the sum of these squared values is same as the number passed to the subroutine (as parameter), then return 1 (i.e. if (122+ 332 4. else return 0 1233) return 1) Part 2: Write a subroutine, that calls the subroutine developed in part 1. The new subroutine is named test_range that performs the following tasks: 1. Runs a loop from 1000 to 9999 (loop variable is named lpcnt (16 bit) 2. Inside the loop body a. call the tester subroutine with the current value of lpcnt passed as parameter. b. if the returned value from tester is 1, store the value of lpnt in data memory (start from location 0x2000 and store the most significant byte first and then the least significant byte of Ipcnt), and increment the lpcnt value by 1 c. else just increment the lpcnt value by 1 Part 3: To verify the correctness of your program, write a program in any higher-level language Note: Because you are doing the subroutine call, you need.to initialize the stack pointer at the start of your program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!