Browse papers
A

Section A: Long Answer Questions

Attempt all / any as specified.

4 questions
1long14 marks

(a) Define an embedded system and explain, with a labelled block diagram, the general architecture of a typical embedded system. Clearly identify the role of the processing unit, memory, input/output subsystem and the system bus. (8)

(b) Compare the Von Neumann and Harvard memory architectures with respect to instruction/data access, bus organization and suitability for microcontroller-based embedded systems. Justify why most modern microcontrollers (e.g. AVR, PIC) adopt a Harvard-based design. (6)

embedded-architecturemicrocontrollers
2long14 marks

(a) What is a Real-Time Operating System (RTOS)? Differentiate between hard, firm and soft real-time systems with one practical example of each. (6)

(b) Explain the concept of task scheduling in an RTOS. With the aid of a timing diagram, illustrate how a pre-emptive priority-based scheduler handles three tasks T1, T2 and T3 (with T1 having the highest priority) that become ready at different instants. (8)

real-time-operating-systemsinterrupts
3long12 marks

Discuss the embedded system design flow from requirement specification to final product. With a neat flow diagram, explain each stage including specification, hardware/software partitioning, co-design, integration and testing. Also explain how design metrics such as power, cost, performance and time-to-market influence design decisions at each stage.

embedded-design-flowembedded-architecture
4long10 marks

(a) Compare I2C, SPI and UART serial communication protocols in terms of number of wires, synchronous/asynchronous operation, multi-master capability, addressing and typical data rates. (6)

(b) A temperature sensor with an I2C interface is to be connected to a microcontroller. Draw the interfacing diagram showing the role of SDA, SCL and pull-up resistors, and describe the sequence of events for the master to read one byte of temperature data from the sensor. (4)

communication-protocolssensor-actuator-interfacing
B

Section B: Short Answer Questions

Attempt all / any as specified.

8 questions
5short8 marks

(a) Differentiate between polling and interrupt-driven I/O. (4)

(b) Explain the term Interrupt Service Routine (ISR) and list the sequence of steps a microcontroller performs when an interrupt occurs, including the role of the interrupt vector table and context saving. (4)

interruptsmicrocontrollers
6short8 marks

(a) Explain the use of the keywords volatile and const in Embedded C, giving a situation where each is essential. (4)

(b) Write an Embedded C code snippet to configure the lower nibble of PORTB as output and the upper nibble as input on an 8-bit microcontroller, then continuously copy the input nibble state to the output nibble. Use bit-masking operations. (4)

embedded-cmicrocontrollers
7short6 marks

Explain how a DC motor can be interfaced to a microcontroller as an actuator. Describe why a driver circuit (e.g. H-bridge / motor driver IC) and PWM are required, and how the speed and direction of the motor are controlled.

sensor-actuator-interfacing
8short6 marks

Differentiate between a microprocessor and a microcontroller. List the major functional blocks integrated inside a typical microcontroller and state why a microcontroller is preferred for embedded applications.

microcontrollersembedded-architecture
9short6 marks

Define the following RTOS terms with one line each: (a) Latency, (b) Jitter, (c) Deadlock, (d) Priority inversion. Briefly explain how priority inheritance mitigates the priority-inversion problem.

real-time-operating-systemsinterrupts
10short6 marks

In UART communication, explain the significance of baud rate, start bit, stop bit and parity bit. If a UART is configured at 9600 bps with 8 data bits, 1 start bit, 1 stop bit and no parity, calculate the time taken to transmit a single character frame.

communication-protocolsembedded-c
11short6 marks

Differentiate between analog and digital sensors with examples. Explain the role of an ADC in interfacing an analog sensor to a digital microcontroller, and define resolution and quantization error of an ADC.

sensor-actuator-interfacingembedded-design-flow
12short4 marks

Write short notes on any TWO of the following:

(a) Watchdog timer

(b) Memory-mapped vs port-mapped I/O

(c) RISC vs CISC architecture

embedded-architecturemicrocontrollers