Assignment 2 Fall 24-25
Assignment 2 Fall 24-25
Faculty of Engineering
Course Name: Microprocessor and Embedded Systems Course Code: EEE 4103
Semester: Fall 2024-25 Term: Mid
Total Marks: 20 Submission Date: 03-12-2024
Faculty Name: Assignment: 02
Course Outcome Mapping with Questions
Obtained
Item COs POIs K P A Marks
Marks
Q1 to Q5 CO1 P.a.4.C3 K4 P1, P3, P7 4x5
Total: 20
Student Information:
Student Name: Student ID:
Section: Department:
Marking Rubrics (to be filled by Faculty):
Excellent Good Acceptable Unacceptable No Response
[4] [3] [2] [1] [0]
Detailed unique
Unable to clarify the Secured
Problem # response explaining Response shows Partial problem is No
understanding of the Marks
the concept understanding of solved; response Response/(Copied/identical
problem and method
properly and the problem, but indicates part of the submissions will be graded
of the problem
answer is correct the final answer problem was not as 0 for all parties
solving was not
with all works may not be correct understood clearly. concerned)
correct
clearly shown.
1
1. Prepare a program that triggers Timer0 interrupt every 10 µs in order to blink an LED light. Also, calculate
the timer count and prepare a flow chart of the program. [4]
2. Determine the output of the following programs and make corrections, if needed: [4]
3. a) Prepare a C++ program for an Arduino UNO to configure the Sleep Mode Control Register (SMCR) so
that the system enters power-save mode and powers down Timer0, Timer1, and SPI peripherals using power
reduction register (PRR).
b) Develop an assembly program for an Arduino UNO to set the Sleep Mode Control Register (SMCR) to
enter the power-down mode while keeping only Timer0 and Timer1 active using power reduction register
(PRR). [4]
4. A security company boasts of their tightknit security systems to its clients. Their systems run continuous
security sweeps. The rate of their sweeps varies based on the client’s subscription model. The premium model
offers a sweep every 55ms whereas the basic model runs the sweep every 400ms. Their system is based on
Arduino Uno platform running at 16MHz. [4]
a) Compute the necessary timer counts to achieve the required delay for the premium and the basic model.
b) If the system uses only a 16-bit timer and if the available prescalers are 8, 64, 256 and 1024, prepare
the necessary setup function and registers associated with the 16-bit timer to achieve the necessary
time counts calculated in 4(a). Consider the timer to be running at normal mode.
[Hint: TCCR1A and TCCR1B have to be initialized. The useful bits of TCCR1A are bit 0 and bit 1 which
represent WGM10 and WGM11 respectively. Bits 0 to 4 are the useful bits from TCCR1B. Bits 3 and 4
represent WGM12 and WGM13 respectively. Bits 0 to 2 represent the clock select functions CS10, CS11, CS12
respectively. Consider WGM = 0 for normal mode of operation. The bits not mentioned here can be
ignored/considered as 0]
5. A TV remote control is to be designed for the selection of channels. The channel selection buttons are
required to be debounced, that is, one press must cause the remote to change to the subsequent channel. It was
observed that the switches exhibit bounce times well under 5 ms. Design a circuit using the 74HC14 Schmitt
Page 2 of 3
trigger IC along with resistance and capacitance and calculate the hysteresis voltage. The worst-case Vth of
74HC14 for a signal going low is 2.2 V and that of when going high is 0.8 V. Consider that the CMOS device
leakage current is 15 A and the gate’s best-case switching point is of the order of 0.4 V. Also, consider that a
Si diode is connected in the circuit and its forward voltage drop, VD = 0.7 V. The supply voltage of the IC is
VCC = 5 V. [4]
Page 3 of 3