Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long12 marks

Define an embedded system and explain its common characteristics that distinguish it from a general-purpose computing system. With the help of a block diagram, describe the typical hardware architecture of an embedded system, clearly identifying the role of the processing unit, memory subsystem, input/output interfaces and the power supply. Differentiate between the Von Neumann and Harvard architectures and justify which one is more suitable for a microcontroller-based embedded system.

embedded-system-architectureembedded-system-design-process
2long12 marks

The embedded system design process is often described as a sequence of well-defined phases. (a) With a neat flow diagram, explain the major steps of the embedded system design life cycle, from requirement specification to maintenance. (b) Discuss the meaning of hardware-software co-design and explain why partitioning of functionality between hardware and software is a critical design decision. (c) Briefly describe how design metrics such as power consumption, unit cost, performance and time-to-market influence the design choices.

embedded-system-design-process
3long12 marks

(a) Define a Real-Time Operating System (RTOS) and distinguish between hard, firm and soft real-time systems with suitable examples. (b) Explain the concept of a task, task states and context switching in an RTOS. (c) A system has three periodic tasks with execution times and periods as follows: T1 (C=1 ms, P=4 ms), T2 (C=2 ms, P=6 ms) and T3 (C=1 ms, P=8 ms). Using Rate Monotonic Scheduling, compute the total CPU utilization and determine whether the task set is schedulable. Show your calculations.

real-time-operating-systemsinterrupt-handling
4long12 marks

Consider the 8051 microcontroller. (a) Draw and explain its internal architecture, describing the function of the ALU, special function registers, the four I/O ports, timers/counters and the internal data/program memory organization. (b) Write an embedded C program for the 8051 that toggles an LED connected to pin P1.0 with a delay generated using Timer 0 in mode 1. (c) Explain how the program counter and stack pointer behave during a subroutine call.

microcontrollersembedded-c-programming
B

Section B: Short Answer Questions

Attempt all / any as specified.

7 questions
5short8 marks

Compare and contrast the I2C, SPI and UART communication protocols on the basis of number of signal lines, synchronous/asynchronous operation, support for multiple masters/slaves, addressing mechanism and typical data rate. State one practical application where each protocol is preferred.

communication-protocols
6short8 marks

With a timing diagram, explain the start condition, slave addressing, acknowledgement (ACK/NACK) and stop condition in an I2C data transfer. Why does the I2C bus require pull-up resistors on the SDA and SCL lines?

communication-protocols
7short8 marks

(a) What is an interrupt? Differentiate between maskable and non-maskable interrupts. (b) Explain the sequence of events that occur when an interrupt is serviced, including the role of the interrupt vector table and the saving of context. (c) What is interrupt latency and how can interrupt nesting and priority levels affect it?

interrupt-handling
8short8 marks

(a) Explain, with a circuit diagram, how a DC motor can be interfaced to a microcontroller using an H-bridge driver, and describe how PWM is used to control its speed. (b) Differentiate between an analog sensor and a digital sensor, and explain why an Analog-to-Digital Converter (ADC) is required when interfacing a temperature sensor such as the LM35 to a microcontroller.

interfacing-sensors-and-actuators
9short8 marks

(a) Explain the use of the keywords volatile and const in embedded C programming with one example each. (b) Why is bit manipulation important in embedded C? Write C statements to set bit 3, clear bit 5 and toggle bit 0 of an 8-bit register named PORTB without affecting the other bits. (c) Differentiate between polling and interrupt-driven I/O in firmware.

embedded-c-programming
10short8 marks

(a) Define a critical section and explain the problem of priority inversion in a real-time system with an example. (b) Describe how a semaphore is used for task synchronization and mutual exclusion. (c) Briefly explain the priority inheritance protocol as a solution to priority inversion.

real-time-operating-systems
11short8 marks

(a) Differentiate between a microprocessor and a microcontroller in terms of architecture, integration of peripherals and typical applications. (b) Compare RISC and CISC processor architectures. (c) Explain the difference between a watchdog timer and a general-purpose timer, and state why a watchdog timer is important in an embedded system.

microcontrollersembedded-system-architecture