0% found this document useful (0 votes)
19 views3 pages

MidSem - ESD - BTech (2024-25) - Solution

The document is a MidSem Question Paper for the Embedded System Design course at the Indian Institute of Information Technology Allahabad. It includes instructions for the exam, a series of technical questions related to microcontroller operations, ADC calculations, resource requirements for designs, and data transfer methods. The exam is closed-book, lasts 120 minutes, and is worth a total of 25 marks.

Uploaded by

tiwarishreya973
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views3 pages

MidSem - ESD - BTech (2024-25) - Solution

The document is a MidSem Question Paper for the Embedded System Design course at the Indian Institute of Information Technology Allahabad. It includes instructions for the exam, a series of technical questions related to microcontroller operations, ADC calculations, resource requirements for designs, and data transfer methods. The exam is closed-book, lasts 120 minutes, and is worth a total of 25 marks.

Uploaded by

tiwarishreya973
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Indian Institute of Information Technology Allahabad

MidSem Question Paper


Course Name: Embedded System Design Course Instructor: Dr. Surya Prakash
Course Code: EC3002 Program Name: [Link] Exam Date: 19 Sep 2025 MM: 25

Instructions:
1. Make the appropriate assumption(s) with an interpretation.
2. Answers should be to the point and concise. Illustrated answers with diagrams, graphs, or circuit
representations will be appreciated.
3. Final scores will be scaled proportionally to a maximum of 25 marks.
4. The examination time slot is 120 minutes (2 Hours)
5. This is a closed-book examination. No reference materials, notes, or books are allowed.
6. Calculators and electronic devices (including smartwatches, mobile phones, and laptops) are strictly
prohibited.
7. Washroom breaks are not permitted during the examination. All answer sheets must be submitted
before leaving the examination hall. No extra time will be given.

[Link]. Question Marks

1 A microcontroller runs at 11.0592 MHz (standard crystal). One machine cycle = 12 2+2+3+3
clock pulses.
A 16-bit timer is used to generate a square wave of approximately 1 kHz on a GPIO
pin by toggling every timer overflow.
(a) Calculate the timer tick period in µs.
(b) Compute the number of ticks required for half-period (since toggling at
overflow).
(c) Find the preload value in decimal and hex to load into the 16-bit timer.
(d) State the final square-wave frequency achieved.

(a)
Clock per machine cycle = 11.0592 MHz ÷ 12 = 921.6 kHz
Tick period = 1 ÷ 921.6 kHz = 1.085 µs
(b)
Half-period for 1 kHz = (1/1000) ÷ 2 = 0.5 ms = 500 µs
Required ticks = 500 ÷ 1.085 ≈ 461 ticks
(c)
Timer counts up to 65,536.
Preload = 65,536 − 461 = 65,075
Decimal = 65,075; Hex = 0xFE03
(d)
Ticks = 461 × 2 = 922 ticks per full period
Period = 922 × 1.085 µs = 1.000 ms
Frequency = 1 ÷ 0.001 = 1 kHz (almost exact)
Output frequency = ~1.0 kHz

2 A light sensor outputs 0–3.3 V, mapped linearly to 0–1000 lux. 4+4+2


The microcontroller has a 12-bit ADC (0–4095 codes, Vref = 3.3 V).
(a) Compute the ADC code at 550 lux.
(b) If the ADC gives code 3072, compute the light intensity in lux.
(c) State whether the resolution per LSB is finer or coarser than 1 lux.
Note: ADC code = the digital number your MCU gets after converting an analog
voltage.

(a)
Voltage = (550 ÷ 1000) × 3.3 = 1.815 V
Code = (1.815 ÷ 3.3) × 4095 = 2250
Code = 2250

(b)
Voltage = (3072 ÷ 4095) × 3.3 = 2.475 V
Lux = (2.475 ÷ 3.3) × 1000 = 750
Lux = 750

(c)
Resolution = 1000 ÷ 4096 = 0.244 lux/LSB < 1 lux → finer

3 A design requires: 4+4+2


• 2 digital inputs (sensors)
• 2 PWM outputs (motor, buzzer)
• 1 UART link (Tx, Rx)
• 1 ADC channel (for analog sensor)

(a) Fill the resource table.

Resource Required Count


GPIO In
GPIO Out (PWM)
UART pins
ADC channels
(b) MCU solution costs ₹200 (all on-chip).
MPU solution costs ₹140 + external ROM ₹40 + RAM ₹30 + PIO ₹35 +
Timer/PWM ₹35 + ADC ₹60 + Glue ₹20.
(i) Compute the Bill of Materials for MPU.
(ii) Compare pin usage: MCU needs only the above I/O pins, MPU requires
extra 30 pins for external memory/control.

(a)
Resource Required Count
GPIO In 2
GPIO Out (PWM) 2
UART pins 2
ADC channels 1
(b)
(i) MPU = 140 + 40 + 30 + 35 + 35 + 60 + 20 = ₹360
MCU = ₹200 → MCU cheaper by ₹160
(ii) MCU external pins = 2 + 2 + 2 + 1 = 7 pins
MPU = 30 extra + 7 = 37 pins
MCU saves both cost (₹160) and pins (~30 fewer)

4 System must transfer 2048 bytes from a sensor module. 4+4+2


Options:
• UART at 19,200 bps, frame = 1 start + 8 data + 1 stop
• 8-bit parallel bus at 500 kHz strobe (1 byte per strobe)
(a) Compute time to transfer using UART.
(b) Compute time using parallel bus.
(c) State which is faster and by what factor.

(a)
Frame size = 10 bits
Bit time = 1 ÷ 19,200 = 52.083 µs
Per byte = 10 × 52.083 = 520.8 µs
For 2048 bytes = 2048 × 520.8 µs = 1.066 s

(b)
Parallel bus = 1 byte per strobe @ 500 kHz
Period = 1 ÷ 500 kHz = 2 µs
For 2048 bytes = 2048 × 2 µs = 4.096 ms

(c)
Parallel = 1.066 s ÷ 0.004096 s ≈ 260× faster
Parallel bus is ~260× faster

You might also like