Posted: May 6th, 2015
Microprocessor Systems and Applications
Paper, Order, or Assignment Requirements
I want the answer for all the questions.
P4 Identify and explain a programming example for representative instructions taken from five different instruction groups
|
Task 1
The code in Appendix A is used to light a led on the PICkit 3 Low Pin Count Demo Board. Identify and explain the function of the instruction sets used in the program.
P5 Explain an example of the use of a subroutine, including the operation of call and return instructions and the function of the stack
P6: Explain the operation of a given section of a program with a specific function |
Task 2
You have been asked to test one of the PICkit 3 Low Pin Count Demo Board. Your tutor has issued you with the schematic diagram see Appendix D, which shows the way components have been connected in the Demo board device. You will write a program that tests the various functionality of the device as listed below.
Test 1: Testing the operation of the button
- Create a flow chart for a program that lights an LED whenever the button is pressed
- Write a program that obeys your flow chart ensuring it is appropriately commented
- Explain the operation of your program
- Upload your program to the target device and demonstrate its operation to your tutor. (take pictures and attach in your assignment)
Test 2: Testing the operation of each LED (your program must contain a subroutine)
- Create a flow chart for a program that lights each led in sequence whenever the button is pressed and starts over if all LEDs are lit.
- Write a program that obeys your flow chart ensuring it is appropriately commented
- Clearly explain how your program works including the operation on how data is handled by considering:
- The function of the call and return
- The function of the stack
P7: Use a microprocessor development system to enter, assemble, download, run and test a typical program application
|
Task 3
For the program you created in task 2, you will need to enter, assemble, download, run and test your program.
- Demonstrate where you used the debugging facilities of Mplab X as you tested your program. Provide appropriate screenshots of any errors encountered and a brief description of your corrections
- Demonstrate the use of the facilities within Mplab X such as the simulator and the watch window in testing your program for correct operation.
- Demonstrate to your tutor the operation of your code on the PICkit 3 Low Pin Count Demo Board. Attach photos to your assignment as evidence
M2 Explain the benefits of using an assembler, and describe two examples of assembler directives
|
Task 4
- What are the benefits of using an assembler compared to hand assembly where the programmer manually enters program code in hexadecimal format?
- For the program shown in Appendix A, identify two assembler directives and then describe their function
M3 Identify and correct a linear and a subroutine programming error in given fragments of program.
|
Task 5
For the programs shown in Appendix B and Appendix C you will need to:
- Identify and correct programming errors within the code using the facilities in Mplab to assist you (taking note of any error codes you receive).
- Rewrite the program and place comments alongside your corrections to highlight the changes you made.
- Download the corrected programs onto your hardware and demonstrate its operation to your tutor. (attach photos as evidence in your assignment)
D1 Explain the use of interrupts and evaluate and contrast the operation of a conventional programmed subroutine with that of an interrupt driven routine
|
Task 6
- Modify the program you created in task 2 so it now uses interrupts in its operations. Make sure you include a flow chart for the modified program. The modified program needs to:
- Be fully and appropriately commented
- Implement the button press detection using interrupts.
- Evaluate and contrast the operation of the program implemented using interrupts against the original program without interrupts taking note of both the advantages and disadvantages of both methods.
D2: Produce program code to facilitate digital input and output of data using appropriate interfacing and explaining the operation of the interfacing device(s).
|
Task 7
Using the PIC18F14K22 or the PIC16F1829 provided with your PickIt 3 kit, implement a program that displays the binary equivalent of a button pressed on a keypad. For at least two buttons, you will need:
- To provide an explanation of the operation of the interfacing device(s) including relevant circuit details of your system
- Code that includes appropriate port initialisation routines, as well as routines that will input and output data
- To provide documentary evidence of the programming process e.g. program flowcharts, debug procedure, testing procedures, simulations etc.
- To demonstrate the correct operation of your program to your tutor and append photos in your assignment as evidence