Using MPLAB please complete the following:
Please can my answer be completed in a word/ excel type document. Thanks for looking at my question
An assembler program has been written for a PIC 16F84 microprocessor which ‘flashes LEDs’ through a left or right sequence. The sample code for scenario tasks 1-4 is as follows: ; U19A2T1-4.asm ; blinks LEDs on outputs in a rotating pattern, with input option to reverse direction ;Set microprocessor as 16F84 INCLUDE ; Setup processor configuration __config _RC_OSC & _WDT_OFF & _PWRTE_ON ; label 2 symbols as memory addresses for counting loops J equ 1F K equ 1E SETUP: org 0 ; BANKSEL TRISA ; clrf TRISA ; bcf STATUS , RP0 ; bcf STATUS , RP1 ; movlw 0x01 ; movwf PORTB ; bcf STATUS,C ; ROTATE: btfss PORTA,0 ; goto RR rlf PORTB,f ; goto DELAY RR: rrf PORTB,f ; DeLAY: movlw 0x32 ; movwf J ; jloop: movwf K ; kloop: decfsz K,f ; goto kloop decfsz J,f ; goto jloop DIRECTION: movlw 0x02 ; xorwf PORTA,0; goto ROTATE ; end ; Task 1 Rewrite the delay section of the program as a subroutine with annotations. Also show how it works by including a ‘printscreen’ of the whole program. Also include a flowchart of the overall program and explain the subroutine section State two advantages a subroutine might have over keeping the delay section within the main program Explain with the aid of a diagram how the microprocessor stack operates. Guidance: Use MPLAB to check that the code ‘builds’ correctly (this will check the syntax), print-screen a copy of code and build result into your answer and also email as ‘U19A2T2.asm’. There is no requirement to run or test the program. Task 2 Rewrite the delay section of the program again using a built-in Timer0 function with annotations. Also explain with aid of a diagram how the timer function counts the delay, including the role carried out by 3 key SFRs used in the program (different SFRs to those in task 1) State two advantages an interrupt function might have over a subroutine Guidance: Use MPLAB to check that the code ‘builds’ correctly (this will check the syntax), print-screen a copy of code and build result into your answer and also email as ‘U19A2T3.asm’. There is no requirement to run or test the program. Task 3 From task 1 select MPLAB to build, run and test the program application. Briefly comment on your test (Watch) results explaining the values stored in the SFR and variable registers. Guidance: To test, you will need to change the delay loop from 0X032 to 0X002 in order to speed up the process in the simulator. Take a print-screen of the simulation running and use ‘View -> Watch’ to show evidence of the operation of key variables (symbols) and SFRs such as: J&K counters, the working, status and port registers; and also email as ‘U19A2T4.asm’.
Why Choose Us
- 100% non-plagiarized Papers
- 24/7 /365 Service Available
- Affordable Prices
- Any Paper, Urgency, and Subject
- Will complete your papers in 6 hours
- On-time Delivery
- Money-back and Privacy guarantees
- Unlimited Amendments upon request
- Satisfaction guarantee
How it Works
- Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
- Fill in your paper’s requirements in the "PAPER DETAILS" section.
- Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
- Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
- From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.