MICROCONTROLLER & EMBEDDED SYSTEM LAB (EC-606) - Important Questions
-
Unit 410 Marks High Priority
Explain the operating principle of an Analog-to-Digital Converter (ADC) when interfaced to a microcontroller. Draw and explain the timing diagram for a successive-approximation ADC. If the ADC requires $N$ clock cycles per conversion and the ADC clock is derived from a microcontroller clock of frequency $f_{clk}$, derive the total conversion time $T_{conv}$ and compute it for given $N$ and $f_{clk}$. Provide any assumptions made.
Core lab experiment on ADC interfacing and conversion timing calculations.
-
Unit 410 Marks High Priority
Write a program (in C or assembly) to generate a PWM output using a microcontroller timer to obtain a specified frequency $f$ and duty cycle $D$ (where $D$ is the fraction of the period the signal is high). Derive the relation between timer reload/compare values and $f$, $D$, and the microcontroller clock $f_{clk}$. Show the formula to compute the timer count or prescaler setting.
Standard timer/PWM calculation and programming task commonly asked in lab exams.
-
Unit 47 Marks High Priority
Compare and contrast the $SPI$ and $I^{2}C$ serial communication protocols in the context of microcontroller peripheral interfacing. Discuss clocking, data framing, master/slave roles, addressing, typical speeds, and typical use-cases. Outline the steps and show pseudo-code to read data from a temperature sensor using $I^{2}C$.
Comparative question between two primary serial protocols frequently examined in labs.
-
Unit 47 Marks High Priority
Explain UART serial communication and its framing (start, data bits, parity, stop). Derive the required baud-rate generator value for a microcontroller with oscillator frequency $f_{osc}$ to achieve a baud rate $B$. Express the generator value formula and discuss the effect of permissible error in baud generation.
Baud-rate calculation and UART configuration is a standard ask in microcontroller labs.
-
Unit 47 Marks Medium Priority
Describe the design and microcontroller interfacing of an 8-bit R-2R ladder DAC. Derive the expression for the analog output voltage $V_{out}$ in terms of reference voltage $V_{ref}$ and digital input value $D$ (where $D$ is an 8-bit integer). Provide the formula and explain the steps for calibration.
Interfacing DAC via R-2R ladder and calculation of analog output is a practical lab question.
-
Unit 47 Marks Medium Priority
Explain external interrupts and nested interrupts in microcontrollers. Design an interrupt service routine (ISR) to handle a mechanical push-button with proper debouncing. Provide pseudo-code for the ISR and for any required initialization.
Interrupt handling and debouncing are typical lab tasks for reliable input interfacing.
-
Unit 410 Marks Medium Priority
Explain the concept of Direct Memory Access (DMA) and how DMA improves data transfer throughput compared to CPU-driven transfer in embedded systems. Draw a block diagram showing CPU, peripheral, DMA controller, and memory. Give a concrete example of using DMA to transfer ADC samples to memory and discuss synchronization issues.
DMA concepts applied to ADC/peripheral transfers are important for performance-oriented questions.
-
Unit 47 Marks Medium Priority
Describe the key concepts of a Real-Time Operating System (RTOS) relevant to embedded lab exercises: tasks (threads), priorities, scheduling, context switch, and inter-task synchronization (semaphores/mutex). Implement a simple producer-consumer scenario using binary or counting semaphores in pseudo-code for an embedded RTOS.
RTOS fundamentals and producer-consumer using semaphores is an applied embedded systems question.
-
Unit 410 Marks Medium Priority
Explain techniques for interfacing stepper motors and DC motors with a microcontroller using driver ICs such as the L293D. For a 4-phase stepper motor, provide timing sequences for full-step and half-step drive modes and discuss how microcontroller timers can be used to control speed and direction.
Motor interfacing (driver IC timing and control sequences) is a common practical lab question.
-
Unit 47 Marks Medium Priority
Write a routine (in C or detailed pseudo-code) to read an analog channel $n$ from an SPI-based ADC (for example MCP3008). Explain the chip-select timing requirements, clock polarity/phase considerations, and the sequence of MOSI/MISO bits. Show how to assemble the received bits into the final digital value.
SPI peripheral interfacing with ADC chips is a representative lab programming question.
Quick Add to Notes
Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.
Create free accountHave an account? Log in
Notes Panel