Cert/Dip in Engineering | My Assignment Tutor

Centre No: 04943 Technical Education Centre for Online Learning Assignment Brief(Learner to fill in all parts highlighted in yellow) Programme Title:BTEC Level 3 Cert/Dip in EngineeringProgramme No:L3E: (RTD06/TJH22/25)Unit Number and Title:Unit 19: Microprocessor Systems & ApplicationsEdexcel Unit Code:Y/600/7114Coursework Title:ProgrammingCoursework Number:U19A2Date issued / downloadedDuration6 weeksStudent NameAssessorG Tweed Task NoAssessment criteria coveredDate AchievedFeedback1st Attempt2nd Attempt*Comment Attached?Grading criteria: P4, P5, P6, P7, M2, M3, D1, D21P4: Identify and explain a programming example for representative instructions taken from five different instruction groups2P5: Explain an example of the use of a subroutine, including the operation of call and return instructions and the function of the stack3P6: Explain the operation of a given section of a program with a specific function4P7: Use a microprocessor development system to enter, assemble, download, run and test a typical program application5M2: Explain the benefits of using an assembler, and describe two examples of assembler directives6M3: Identify and correct a linear and a subroutine programming error in given fragments of program.7D1: Explain the use of interrupts and evaluate and contrast the operation of a conventional programmed subroutine with that of an interrupt driven routine8D2: Produce program code to facilitate digital input and output of data using appropriate interfacing and explaining the operation of the interfacing device(s).Scenario: You are starting out as an apprentice technician where you need to understand microprocessor programming code and their application. You have been asked to explain sample assembly code provided, develop and test programs and apply to specific applications such as robot control.Evidence you must produce for this assignment: Written report with example and diagrams. Also a copy of assembly computer program files.Sources of information: Unit 19 course notes sections 3 and 4. Martin Bates PIC Microcontrollers: An Introduction to Microelectronics. ISBN 0 7506 6267 0 MPLAB: ver.8.9, 16f84,16f690 datasheets, PICkit2 tutorial : Microchip.com*Re-submission Conditions: Only one opportunity to re-submit work will be allowed for each task. All three of the conditions below must be met if this is to be allowed: These are that: You have met the original ‘deadline’ date or agreed extension date. The normal extension on receipt of approved extenuating circumstances will be 5 days Your tutor judges that you will be able to provide improved evidence without further guidance Your tutor can be sure that the evidence submitted is your own work, and that you have signed a declaration of authenticity declaring that it is your own work. A resubmission date will be set for 15 working days after the assessment has been returned to you. Coursework Internal Verifier : Sign(WWatson)23/9/20 Assessment Record Sheet 1. Learner to fill in on first submission: Task ref(s)Evidence submitted (e.g. written report, calculation, file name).Task ref(s)Evidence submitted (e.g. written report, calculation, file name).Additional learner comments to the assessor:Learner Declaration on Submission I certify that the evidence submitted for this assignment is my own. I have clearly referenced any sources used in the work. I understand that false declaration is a form of malpractice.Learner Signature.Date. 2. Assessor to fill in on first submission: Task ref(s)Assessor comment on task(s)Task ref(s)Assessor comment on task(s)General feedback from the Assessor:Remember to complete your Skype call for this unit, as detailed belowHas an extension to the deadline been approved by the Assessor due to extenuating circumstances?Assessor Declaration on Submission I certify that the evidence submitted for this assignment is the learner’s own. If it is not their own work, then this is clearly explained and detailed in the feedback and comments aboveAssessor Signature.Date. 3. Learner to fill in on resubmission: Task ref(s)Evidence submitted (e.g. written report, calculation, file name).Task ref(s)Evidence submitted (e.g. written report, calculation, file name).Additional learner comments to the assessor:Learner Declaration on resubmission I certify that the evidence submitted for this assignment is my own. I have clearly referenced any sources used in the work. I understand that false declaration is a form of malpractice.Learner Signature.Date. 4. Assessor to fill in on resubmission: Task ref(s)Assessor comment on task(s)Task ref(s)Assessor comment on task(s)Resubmission feedback from the Assessor:Does the learner need to attempt an assessment Retake? Y/NDate of Retake:Assessor Declaration on resubmission I certify that the evidence submitted for this assignment is the learner’s own. If it is not their own work, then this is clearly explained and detailed in the feedback and comments aboveAssessor Signature.Date. Sample Type: (First or resubmission)Samples IV Signature:Date: Assessment Authentication Skype Call Required(shown in assessment 2 only) All assessment grades are subject to authentication, which normally requires a Skype call. This should be ideally done after each unit, and at least after every 2 units A Skype call can be made any time after the 2nd assessment has been submitted (you don’t have to wait for it to be marked) to any of the following tutors whose skype names are: ‘Geoff.tweed2’ (Mon-Tue), or ‘Billtecol’ (Wed-Thur) Typical times for authentication Skype calls are: 12.30-13:30, and 18:30-20.00and who will ask the following questions: General unit/assessment questions 1. What was easy and what was difficult? 2. Did you attempt all tasks? 3. Where you unsure about any tasks in particular? Specific assessment questions You will be asked two specific questions from your assessments, and you will be expected to answer these without simply reading them off your assessment during the Skype call. So be prepared before calling. 4. From assessment: U19A1 – 5. From assessment: U19A2 – 1 Assessment Tasks Assessment grading instructions: Tasks 1 to 4 are required for PASS (P) grade and must be attempted Tasks to 5 are 7 also required for MERIT (M) grade (optional) Tasks 8 is also required for DISTINCTION (D) grade (optional) Work for Merit/Dist grades should also be supported by fully referenced evidence Please carefully read your course guidance and add all your written work below the tasks. Remember to sign (not typed) the learner section of assessment record sheet above TECOL uses a PLAGiaRISM Checker, so it is Important All answers must be your own worK Vocational Scenario or Context You have just taken a position as a Trainee Electronic Software Engineer in a small company. The company is a sub-contractor to a range manufactures who embed microcontrollers or microprocessors into their products As part of your training you are required to show your Training Manager that you understand microprocessors and are capable of writing and testing microprocessor programming simulation software For programming tasks 2-4, 6, and 8, you must email a copy of the ’asm’ file (do not embed these into the word document), print a copy of the code, and show evidence of build and test by snipping images. Program information to be used for tasks 1-4: (Pass criteria P4-7) 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 TRISB; clrf TRISB; 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 [Pass criteria: P4] In order to explain the main instruction groups, you are required to annotate each line of code of the program above by explaining their meaning.In addition, explain the purpose of the program sections – SETUP, ROTATE, DELAY and DIRECTION; including the role of the special function registers (SFRs) used in the program Guidance: Take a copy of the program and paste it into your assessment answer and fill in the missing comment lines from ‘SETUP’ to ‘END’ in the same format as lines 1-3. Checklist of evidence required: T1 – Include a copy of the program with code comments, and a 300-word report Task 2 [P5] 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.Explain the subroutine section and state two advantages a subroutine might have over keeping the delay section within the main programExplain with the aid of a diagram how the microprocessor stack operates and its main purpose. 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’. Highlight all changes to the program in red. There is no requirement to run or test the program. Checklist of evidence required: T2 –Include copy of updated program, evidence of successful build, asm code file and a 300-word report with appropriate diagrams Task 3 [P6] 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’. Highlight all changes to the program in red. There is no requirement to run or test the program. Checklist of evidence required: T3 –Include copy of updated of program, evidence of successful build, asm code file, and a 300-word report Task 4 [P7] From task 1 select MPLAB to build, run and test the program application.Changing the delay loop from 0X032 to 0X002 in order to speed up the process in the simulator. Comment on your test (Watch) results explaining the values stored in the SFR and variable registers. Guidance: To test, you will need to 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’. Checklist of evidence required: T4 –Include images (snip/printscreen) of your program code, and testing with appropriate watch windows, asm code file and a 100-word commentary Task 5 [Merit criteria: M2] Explain the benefits of using an assembler program compared to:Hexadecimal machine code,The ‘C’ high level languageUsing an example of each describe:Control directiveData directive Guidance: requires referenced evidence and 400 of your own words Checklist of evidence required: T5 –Provide a 400-word report with appropriate examples and evidence of research Task 6 [Merit criteria: M3] The following piece of assembly code has 2 errors. Read the code carefully before completing this task Identify and correct a linear and a subroutine programming error located in lines 20-35.Use a microprocessor development system such as MPLAB to enter, assemble, run and test the program application. (‘comment out’ the faulty code with’;’ before build and test) Guidance: T6a: You need to clearly identify and write the 2 lines of code with their error, followed by the same 2 lines with the corrected code. Highlight the incorrect code in yellow, with the correct code in red. T6b: Take a print-screen of your code, ‘build succeed’, simulation running (with key SFRs in ‘Watch’ view) and email a copy of your ‘U19Task6.asm’ program. Briefly comment on your test (Watch) results. ; Slow output binary count is stopped, started; and reset with push buttons. This version uses a; subroutine for the delay….;; *******************************************************************processor 16f84include __config _RC_OSC & _WDT_OFF & _PWRTE_ON; Register Label Equates……………………………………….porta EQU 05 ; Port A Data Registerportb EQU 06 ; Port B Data Registertimer EQU 0C ; Spare register for delay; Input Bit Label Equates………………………………………inres EQU 0 ; ‘Reset’ input button = RA0inrun EQU 1 ; ‘Run’ input button = RA1; Initialise Port B (Port A defaults to inputs)…………………….MOVLW b’00000000’ ; Port B Data Direction CodeTRIS portb ; Load the DDR code into F86GOTO reset; ‘delay’ subroutine………………………………………….delay MOVWF timer ; Copy W to timer registerdown DECFSZ timer ; Decrement timer registerGOTO reset ; and repeat until zeroRETURN ; Jump back to main program103; Start main loop……………………………………….reset CLRF portb ; Clear Port B Datastart BTFSS porta,inres ; Test RA0 input button is setGOTO reset ; reset Port B if pressedBTFSC porta,inrun ; Test RA1 input button is clearGOTO start ; and run count if pressedINCF portb ; Increment count at Port BMOVLW 0FF ; Delay count literalCALL wait ; Jump to delay subroutineGOTO start ; Repeat main loop alwaysEND ; Terminate source code Checklist of evidence required: T5 –Include images (snip/printscreen) of your fault identification, program code, and testing with appropriate watch windows, and asm code file Task 7 [D1] With three appropriate examples as evidence, explain the use of interrupts in a programming applications such as washing machines, car ECUs or a heating controllers (see U19A1 task1)Using one of these application examples, evaluate and contrast the operation of a conventional programmed subroutine with that of an interrupt driven routine. Guidance: requires appropriate referenced research evidence such as microprocessor datasheet and 600 of your own words Checklist of evidence required: T7 –Provide a 600-word report with appropriate examples and evidence of research Task 8 [D2] Based on your microprocessor study material, develop robot line follower program that controls a mobile robot with 2 motor driven wheels to follow a black line using 2 infra-red (IR) sensors (1 either side of the line), that sense and correct if the robot accidently crosses the line to the right or left. It can also sense and stop or turn around if reaches the end of the line (both IR sensors activated by a black strip at 90o). The 2 motors can be driven in forward or reverse together or independently. Researching the internet or appropriate books, find two electronic circuits that could allow the above sensors and motors to be interfaced a microprocessorAs a prototype, design a simple electronic circuit with a 16F690 PIC which can use to push switches to represent the left/right IR sensors (digital inputs) and LEDs to represent the robot left/right, forward/reverse drive motors (digital outputs). Your design diagrams should show the inputs/outputs connected to specific ports with appropriate load protective resistors and a simple flow chart on its operation.Create an appropriate assembly program for the above, by taking a print-screen of your code, ‘build succeed’.Test by using the stimulus workbook to fire inputs to simulate inputs when running (show key symbols/SFRs in ‘Watch’ view as evidence). Briefly comment on what your test results based on the ‘Watch’ windowEmail a copy of your ‘U19A2Task8.asm’ program Guidance: You do not have to physically build this circuit, just design it create/test the appropriate program. Clearly list the purpose of each switch and LED by linking or listing these to the sensors/motors Checklist of evidence required: T8 –Include images (snip/printscreen) of your program code, and testing with appropriate watch windows, asm code file and a 100-word commentary with appropriate circuit images

QUALITY: 100% ORIGINAL PAPER – NO PLAGIARISM – CUSTOM PAPER

Leave a Reply

Your email address will not be published. Required fields are marked *