Computer architecture - Embedded architectures - lecture 9a - Charles Fox - University of Lincoln
Overview
Charles Fox explains why embedded systems prioritize low power, compact hardware, dedicated functionality, and dependable timing over the general-purpose flexibility of desktops and cloud computers. He connects those requirements to sensors, actuators, microcontrollers, timers, direct I/O, and analog-to-digital conversion, then uses the Arduino and its ATmega328 AVR processor to illustrate the hardware, instruction set, and engineering trade-offs involved.
Key takeaways
- Embedded systems are optimized for a specific physical task, so their designers can choose smaller CPUs and less memory than a general-purpose computer requires.
- Hard real-time performance means guaranteeing that a task meets a defined deadline, not merely achieving a good average speed.
- Putting the CPU, memory, timers, converters, and I/O on one microcontroller chip reduces physical size and power needs.
- The ATmega328 illustrates the embedded trade-off: an 8-bit CPU at about 20 MHz with 32 KiB of flash and 2 KiB of RAM can still control useful real-world systems.
- Arduino's standardized connectors, USB support, and shield ecosystem make embedded hardware more accessible without removing the single-purpose nature of embedded programming.
- Watchdog timers provide independent recovery: a system can reset after missed health reports even when its main CPU program has stopped working.
Chapters
- Cloud data centers handle heavy computation, including much AI work, while physical-world devices are designed to be smaller and lower power.
- The Internet of Things connects embedded devices, such as smart meters, to larger cloud systems.
- An embedded system is a computer built into a product whose main purpose is something other than computing, such as a vending machine.
- Cars use embedded controllers for features ranging from windows and HVAC to safety-critical ABS braking and pedestrian detection.
- Robots rely on low-level controllers to make motors achieve requested wheel speeds, alongside higher-level mapping and planning.
- Fox estimates a home may contain 40 to 50 embedded systems, and cites a 2009 estimate that embedded devices made up 98% of processors worldwide.
- Embedded jobs often sit within engineering sectors such as automotive, healthcare, industrial systems, telecommunications, and aerospace.
- Unlike a general-purpose PC, an embedded system is typically built to perform one defined task, such as controlling a pacemaker or washing machine.
- Designers select only the CPU, memory, and I/O needed for that task, then optimize for reliability, size, power, and cost.
- Hard real-time systems must guarantee that work finishes within a specified deadline, such as sensing a pacemaker input within 10 milliseconds.
- Safety-critical products may require formal certification and evidence that timing and behavior meet legally significant guarantees.
- Sensors convert physical measurements into signals: examples include switches, photodiodes, pressure-sensitive resistors, and inertial measurement units.
- An IMU commonly combines an accelerometer, magnetometer, and gyroscope to estimate acceleration, orientation, and rotation.
- A microcontroller processes sensor data, while actuators create physical effects such as motor movement, steering, lights, horns, and radio transmissions.
- Lincoln's autonomous mobility scooters use a rear-wheel motor and a linear actuator to steer the front wheels.
- A microcontroller combines a CPU with memory, timers, analog-to-digital converters, I/O, and communication hardware on one chip.
- Embedded constraints commonly favor small, low-power processors, sometimes 8-bit CPUs running at megahertz or kilohertz speeds with integer-only arithmetic.
- Simple architectures can be easier to verify and test, an important advantage when automotive or medical products require safety evidence.
- Many systems use a Harvard architecture, storing program firmware in ROM or flash and data separately, with persistent settings retained across power cycles.
- A hardware counter driven by an accurate clock becomes a timer that can track physical time and schedule work at intervals such as every 10 milliseconds.
- Interrupts or polling can trigger scheduled tasks, and embedded systems may use multiple timers for separate deadlines.
- A watchdog timer expects periodic health reports and can reset a system if the reports stop arriving before a threshold.
- Watchdogs are useful in remote systems such as a Mars rover, where physically power-cycling a failed computer is impractical.
- Embedded chips often expose individual I/O pins for direct signals instead of the address and data buses typical of larger computer systems.
- Pins can be configured as inputs or outputs to read switches or control devices such as LEDs.
- Analog-to-digital conversion samples a continuous voltage and quantizes it into discrete values; sampling frequency and resolution determine the resulting data rate.
- The Nyquist theorem requires sampling at least twice the highest frequency being represented; audio sampling near 44 kHz supports the roughly 20 kHz range of human hearing.
- Common audio resolutions include 8-bit for intelligible but rough speech and 16-bit for CD-quality audio.
- Arduino combines a microcontroller board, standardized connectors, USB programming support, and a widely adopted software ecosystem.
- Its standardized layout supports plug-in shields for tasks such as sensing and motor control, reducing hardware setup barriers for software developers.
- Arduino programs commonly use a C-like language with commands for pin I/O and timers; flashing an LED is the introductory example.
- Hardware compatibility and existing investment help explain why the original Arduino design remains in use even as more powerful boards appear.
- The classic Arduino uses Atmel's ATmega328, an 8-bit RISC-style microcontroller running at about 20 MHz and operating across roughly 2 to 5 volts.
- The chip integrates about 32 KiB of flash and 2 KiB of RAM, alongside CPU, memory, and I/O circuitry.
- Its 32 general-purpose registers distinguish it from the 6502, which has three user registers.
- Arduino board pin layouts support compatible shields, while the chip's I/O pins provide direct digital signals and analog input capabilities without external bus pins.
- The AVR instruction set includes arithmetic, logic, shifts, multiplication, stack operations, jumps, calls, and conditional branches.
- Its RISC-style data movement separates register-to-register arithmetic from loading and storing data; indirect addressing supports pointers in C-like languages.
- An assembly LED-blink program configures output pins, sets timer values, and uses a counter loop to create a delay.
- Arduino-compatible variants include the Ruggeduino, which adds protection against electrical and environmental damage, and the smaller, cheaper Pro Micro.
Transcript excerpt
0:00 Embedded systems are all around us. In the 2020s, computing has tended to split into two different domains. The version you currently hear about in the media is this version. This is stuff that is happening in the cloud, which means running on other people's computers on servers somewhere far away in a big physical building, often known as a data center. And this this is where most of the the heavy load compute work, especially AI-based compute work is sitting. On the other side of the 2020s, you've got these devices out in the physical world. And while while these cloud machines
0:48 have been getting bigger and more powerful, these devices have been getting deliberately smaller and lower power. So it used it used to be considered macho to say how powerful is your computer and to have the most powerful computer. But if you're working in this world, it's the opposite. You really want your your machine to be low power. If you're building a a tiny device that's going to sit inside a a wind farm or or a a food farm, sit inside a greenhouse or a factory or go inside a car or go on someone's person, you want these devices to be low power so that they minimize energy consumption and maximize battery life. These are often devices that are not connected to the mains. They're
1:34 connected to a battery and so you really care about power consumption. And the the concept of the internet of things means lots of these tiny little computers all around the physical world that are connected over the internet to the big computers sitting here in the cloud. And we're we're reaching this world where everything is being sensed and monitored. You probably have a smart in your house for your water, your
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Charles Fox.