Published by Patrick Mutisya · 8 days ago
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.
| Component | Role in an Embedded System |
|---|---|
| Microcontroller / Microprocessor | Executes the control program; integrates CPU, RAM, ROM, and I/O peripherals on a single chip. |
| Memory | Flash or EEPROM for program storage; SRAM for runtime data. |
| Input/Output Interfaces | GPIO, ADC, DAC, UART, SPI, I²C, CAN, etc., to communicate with sensors, actuators, and other devices. |
| Power Supply | Battery, mains, or energy‑harvesting circuits; often includes voltage regulation. |
| Real‑Time Operating System (RTOS) (optional) | Provides task scheduling, interrupt handling, and timing services. |
| Aspect | Embedded System | General‑Purpose Computer |
|---|---|---|
| Purpose | Single, dedicated task | Multiple, varied tasks |
| Hardware | Optimised, often single‑chip | Modular, expandable |
| Operating System | RTOS or bare‑metal | Full‑featured OS (Windows, Linux, macOS) |
| Power Consumption | Low, often battery‑powered | Higher, mains‑powered |
| Cost | Minimised per unit | Higher per unit |
| Reliability Requirement | Very high – often mission‑critical | Moderate – user can reboot |
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\$.
Emerging directions include: