Uploaded by adnan.46214

Summer 2021

advertisement
Final-Term Exam Summer – 2021
Subject:
Embedded Systems
Instructor: M. Khalid
Program: BE(EE)
Submission Duration:
Submission Date:
Max. Marks:
3 Hours
07-09-2021
40
Please follow the instructions carefully:
1.
Write your answers directly on BlackBoard or upload the answer file with in the submission
Time on Blackboard.
2.
Write your name and registration ID on the first page of your Word file.
3.
Answer scripts can only be uploaded on Blackboard any time before its deadline.
4.
To avoid any unforeseen problems, you are advised NOT to wait for the last hour to upload your
answer script.
5.
Submission of answer copy(ies) will be considered acceptable through Blackboard only.
Therefore, do not submit your document through email or any other medium.
6.
Use 12 pt. font size and Times New Roman font style along with 1-inch page margins.
7.
Follow the requirements of the word limit and the marking criteria while writing your answers.
8.
Provide relevant, original and conceptual answers, as this exam aims to test your ability to
examine, explain, modify or develop concepts discussed in class.
9.
Do not copy answers from the internet or other sources. The plagiarism of your answers may be
checked through Turnitin.
10.
Recheck your answers before the submission on BlackBoard to correct any content or language
related errors.
11.
Double check your word file before uploading it on BlackBoard to ensure that you have uploaded
the correct file with your answers.
Question No 1
[10 Marks]
a) Design a code that controls the switching frequency of an LED. Use a Soft Potentiometer to
provide an analog input to the Arduino and control the switching frequency via the Soft
Potentiometer.
b) It is required to interface a single digit 7 segment display with Arduino board. Design hardware
for the said task using the pin layout. Additionally, write a code that will count from digit 9 to
0 with a delay of one mile sec, iteratively.
Clarity/ legibility
Correct Approach
Full Steps
Develop possible example
= 2 Mark
= 2 Mark
= 3 Marks
= 3 Marks
Question-2
[10 Marks]
a) Design a code that uses shift register IC 74HC595 to blink 4 LEDs in Ping Pong fashion, such
that the LEDs blink in a to-and-fro manner.
b) Interface a push button and an RGB LED to the Arduino. The RGB LED should switch its
color whenever the push button is pressed. Your code should include Red colors that can be
displayed by an RGB LED. Draw the circuit diagram of this scenario
Clarity/ legibility
Correct Approach
Full Steps
Develop possible example
= 2 Mark
= 2 Mark
= 3 Marks
= 3 Marks
Question-3
[10 Marks]
a) Design an embedded system using two Arduino boards such that counting from 9 to 0 is
displayed on a 7-segment connected on first Arduino, when the counter reaches 0 the first
Arduino serially transmits an interrupt to the second Arduino. Upon the reception of the
interrupt, the second Arduino starts counting on another 7-segment connected at its IO
from 9 to 0. Upon completion of counting at second Arduino, it transmits an interrupt to
the first Arduino, which in turn starts counting in a descending order from 0 to 9 and the
same process continues. Also draw the circuit diagram of the scenario.
b) Describe the function and arguments of the following commands:
i.
ii.
iii.
iv.
v.
pinMode & servo1.write
digitalWrite & digitalRead
analogRead & analogWrite
constrain() & map()
Serial.begin & Serial.print
Clarity/ legibility
Correct Approach
Full Steps
Develop possible example
= 2 Mark
= 2 Mark
= 3 Marks
= 3 Marks
Question-4
[10 Marks]
a) Write short notes on the following:
i) Differentiates Arduino and raspberry pi? With suitable piratical examples.
ii) Difference between the model a, the model b, and the model b+?
b) Write a code to control the toggling frequency of two LEDs using analog input. Also draw
the circuit diagram.
Clarity/ legibility
Correct Approach
Full Steps
Develop possible example
= 2 Mark
= 2 Mark
= 3 Marks
= 3 Marks
Download