Embedded System Design

profileyv1996
ENEX20001T2_2019Assessment_2.pdf

1/2

ENEX 20001 2019 T2

Assignment 2 Hardware Tasks Due date: Friday of Week 8(13th of Sept. 2019) 23:45hrs.

ASSESSMENT Weighting: 20% of unit final mark

2 Length:

Submission

N/A

Online as a single word file

Important Note:

All programs should be associated with appropriate flowcharts and comments, marks will be given to the explanations of your algorithms and program. All programs should be made to work on the provided CQU PIC Development board and the sensor/actuator board.

All programs must be developed in MPLABX IDE with MCC18 C compiler. You should use CQU_LCD_Ver2.h or CQU_LCD_Ver3.h without any modification to them. Your own header files for the LCD display are not allowed for this assessment. No Assembly Language subroutines are allowed. You can attach screenshots of running program as well.

Q1. (100marks) (a) Write a program to read a 6-digit password from the sensor board keypad and validate it.

Should display a welcome or error message on LCD depending on the password entered. (Every student must provide the correct 6-digit password to test. If not provided, it will be considered as a non-working program) (50/100 marks)

(b) Write a program to measure the distance from the on board ultrasonic sensor(of the sensor and actuator board) to an obstacle in front of it and display the distance in centimetres on your computer display every time when you press S2 on PIC development board. (hint: you need to connect PIC board and your laptop using the USB to RS232 cable) (50/100 marks)

(100% of marks is equal to 20% of unit total)

2/2

Assessment criteria: This assignment is based on PIC18F4321 hardware programming skills using C language. To obtain full marks students must provide all in detail problem solving and solution development evidences. Each student must have their unique programs developed by themselves. Answer to every problem should include a flowchart / NS-diagram or other similar graphical representation of the solution. All programs should have in-program comment lines and the algorithms/procedures used must be separately explained. A good working program as the answer to a question without evidence of development of it(ex: a soft copy of workbook pages relevant to it) will receive a maximum of 50% of the allocated marks for that question. Provide screenshots of your answers wherever applicable. Allocation of marks: Graphical representation 0 – 20% Fully working program producing expected outcomes 25 – 50% Explanation of algorithms/procedures and in program comments 0 – 30%

(No model answer will be provided as there is no unique answer to any of the questions.) Submission instructions: Develop your program to solve the problem in each question. When they run successfully, copy the entire program to your answer script in MS WORD. Then close your project and open a new project. Copy your listing from the answer script(WORD document) and paste it into the new project’s main c file. Build the project and run it to check whether it runs smoothly. Download the newly complied code to the hardware target and test against expected outcomes. If it does not run now, it will not run on marker’s computer as that is what the marker does. ( Hint: When you first copy from project to WORD document, WORD may auto-correct some spelling, capitalize initial words, etc. which will prevent your answer from running successfully in the marker’s computer when copy and pasted into a new project. The above exercise will highlight you if there are any such things done by WORD Auto correct feature and you can now correct them before submitting. Repeat this exercise until you get the new project run at a single click when you copy and paste from WORD document into the new project. That make sure your submitted program runs smoothly on marker’s computer. The marker will not try to correct them. Any submitted program with compilation errors will receive very low marks !)