Question: PRACTICE SESSION - MICROCONTROLLERS Using MPLAB XIDE, execute the instructions given. Load the starting values for the registers and memory locations as given in the


PRACTICE SESSION - MICROCONTROLLERS Using MPLAB XIDE, execute the instructions given. Load the starting values for the registers and memory locations as given in the tables using Mov instructions. The registers and memory locations are modified by the instructions, confirm the final register and memory contents after each instruction with your calculated values. Register Value Location Value WO 0x1004 0x1000 0x382A W1 0x1006 0x1002 OxFB80 W2 0x8301 Ox1004 0x80FF W3 OxF0A2 0x1006 7B03 W4 0xFFFF 0x1008 0001 1. MOV 0x1000, WREG 2. MOV W2, [W1] 3. ADD W2,W1,WO 4. ADD 0x1002, WREG 5. SUB.B WO, #5, W1 6. MOV #1006, WO 7. INC [WOJ, W1 8. MOV #1000, W1 9. DEC.B WO, [W1] 10. SUB W2, [W],[WO) 11. DEC2.B W2,w1 12. INC Ox1004 1. Submit the code and outputs of the above instructions. 2. Write a PIC24 instruction sequence that accomplishes k=i-j-32, where i, j and k are uint8 variables. 3. Write PIC24 assembly language equivalents for the following C code fragment. Assume i, j and k are uint16 variables. k = i + G & 0x4554) - Ox30 Submit the codes as well as memory blocks or watch variables windows to show the correct working of the code. PRACTICE SESSION - MICROCONTROLLERS Using MPLAB XIDE, execute the instructions given. Load the starting values for the registers and memory locations as given in the tables using Mov instructions. The registers and memory locations are modified by the instructions, confirm the final register and memory contents after each instruction with your calculated values. Register Value Location Value WO 0x1004 0x1000 0x382A W1 0x1006 0x1002 OxFB80 W2 0x8301 Ox1004 0x80FF W3 OxF0A2 0x1006 7B03 W4 0xFFFF 0x1008 0001 1. MOV 0x1000, WREG 2. MOV W2, [W1] 3. ADD W2,W1,WO 4. ADD 0x1002, WREG 5. SUB.B WO, #5, W1 6. MOV #1006, WO 7. INC [WOJ, W1 8. MOV #1000, W1 9. DEC.B WO, [W1] 10. SUB W2, [W],[WO) 11. DEC2.B W2,w1 12. INC Ox1004 1. Submit the code and outputs of the above instructions. 2. Write a PIC24 instruction sequence that accomplishes k=i-j-32, where i, j and k are uint8 variables. 3. Write PIC24 assembly language equivalents for the following C code fragment. Assume i, j and k are uint16 variables. k = i + G & 0x4554) - Ox30 Submit the codes as well as memory blocks or watch variables windows to show the correct working of the code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
