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 transcribedimage 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 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

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions