Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
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 wo wi W2 W3 W4 Value Ox1004 Ox 1006 Ox8301 OxF0A2 OxFFFF Location Ox1000 Ox1002 Ox1004 Ox 1006 Ox1008 Value 0x382A OxFB80 Ox80FF 7B03 0001 MOV Ox1000, 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 [WO], WI 8. MOV #1000, W1 9. DEC.B WO, [W] 10. SUB W2,[W] [WO] 11. DEC2.B W2,w1 12. INC 0x1004 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 + (j & 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 wo wi W2 W3 W4 Value Ox1004 Ox 1006 Ox8301 OxF0A2 OxFFFF Location Ox1000 Ox1002 Ox1004 Ox 1006 Ox1008 Value 0x382A OxFB80 Ox80FF 7B03 0001 MOV Ox1000, 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 [WO], WI 8. MOV #1000, W1 9. DEC.B WO, [W] 10. SUB W2,[W] [WO] 11. DEC2.B W2,w1 12. INC 0x1004 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 + (j & 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Explain how to reward individual and team performance.

Answered: 1 week ago