Show understanding of embedded systems

Published by Patrick Mutisya · 8 days ago

Cambridge A-Level Computer Science – 3.1 Computers and Their Components: Embedded Systems

3.1 Computers and Their Components – Embedded Systems

What is an Embedded System?

An embedded system is a computer system designed to perform a dedicated function or set of functions within a larger mechanical or electrical system. Unlike general‑purpose computers, it is “embedded” as part of the device it controls.

Key Characteristics

  • Dedicated functionality – usually a single, well‑defined task.
  • Real‑time operation – often required to respond within strict timing constraints.
  • Resource‑constrained – limited CPU speed, memory, power, and storage.
  • Reliability and durability – must operate continuously for long periods.
  • Often invisible to the end user.

Typical Components

ComponentRole in an Embedded System
Microcontroller / MicroprocessorExecutes the control program; integrates CPU, RAM, ROM, and I/O peripherals on a single chip.
MemoryFlash or EEPROM for program storage; SRAM for runtime data.
Input/Output InterfacesGPIO, ADC, DAC, UART, SPI, I²C, CAN, etc., to communicate with sensors, actuators, and other devices.
Power SupplyBattery, mains, or energy‑harvesting circuits; often includes voltage regulation.
Real‑Time Operating System (RTOS) (optional)Provides task scheduling, interrupt handling, and timing services.

Design Process – Step by Step

  1. Define the functional requirements and performance constraints.
  2. Select appropriate hardware (CPU speed, memory size, peripherals).
  3. Choose a development environment and, if needed, an RTOS.
  4. Write and test the firmware, emphasizing deterministic timing.
  5. Integrate with the host device and perform system‑level testing.
  6. Validate reliability, power consumption, and compliance with standards.

Embedded vs. General‑Purpose Computers

AspectEmbedded SystemGeneral‑Purpose Computer
PurposeSingle, dedicated taskMultiple, varied tasks
HardwareOptimised, often single‑chipModular, expandable
Operating SystemRTOS or bare‑metalFull‑featured OS (Windows, Linux, macOS)
Power ConsumptionLow, often battery‑poweredHigher, mains‑powered
CostMinimised per unitHigher per unit
Reliability RequirementVery high – often mission‑criticalModerate – user can reboot

Performance Modelling

For a real‑time embedded task, the worst‑case execution time (WCET) must satisfy the deadline \$D\$:

\$\text{WCET} \le D\$

If the system runs \$n\$ periodic tasks, the utilisation \$U\$ must obey Liu & Layland’s bound for rate‑monotonic scheduling:

\$U = \sum{i=1}^{n} \frac{Ci}{T_i} \le n\left(2^{1/n} - 1\right)\$

where \$Ci\$ is the computation time and \$Ti\$ the period of task \$i\$.

Examples of Embedded Systems

  • Automotive engine control unit (ECU)
  • Digital washing‑machine controller
  • Smart thermostat
  • Medical infusion pump
  • Industrial PLC (Programmable Logic Controller)

Future Trends

Emerging directions include:

  • Internet of Things (IoT) – networked sensors and actuators.
  • Edge AI – on‑device machine learning inference.
  • Ultra‑low‑power architectures (e.g., ARM Cortex‑M0+, RISC‑V).
  • Secure boot and hardware‑based security modules.

Suggested diagram: Block diagram of a typical embedded system showing microcontroller, memory, I/O peripherals, power supply, and external sensors/actuators.