ENEX20001 Embedded System Design:Ultrasonic Sensor

Q1. (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).

(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).

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. 

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.

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"