Loading header...

Microprocessor vs Microcontroller

These two terms are used interchangeably in casual conversation — but they describe fundamentally different devices. Choosing the wrong one for a project wastes money, PCB space, power, and development time.

Learning Objectives

  • Distinguish an MCU, application processor, SoC, and processor module.
  • Identify external memory, power, clock, and boot requirements.
  • Choose a device class from latency, power, software, memory, and cost needs.
  • Verify the choice with the exact device documentation.

The Core Distinction

A microprocessor usually means a processor intended to use substantial external memory and system support. Modern application processors are SoCs and often integrate GPUs, memory controllers, and peripherals, so “CPU only” is a historical contrast rather than a universal definition.

A microcontroller is a complete computer on a chip. CPU, memory, and peripherals are all integrated into a single package.

flowchart TD subgraph MPU ["Microprocessor System"] CPU_EXT[CPU Chip\ne.g. Intel 8086] RAM_EXT[External RAM Chip] ROM_EXT[External ROM/Flash Chip] IO_EXT[External I/O Chip\nUART, GPIO, Timers] PWR_EXT[Power Management IC] CPU_EXT <-->|Address + Data Bus| RAM_EXT CPU_EXT <-->|Address + Data Bus| ROM_EXT CPU_EXT <-->|Address + Data Bus| IO_EXT PWR_EXT --> CPU_EXT end subgraph MCU ["Microcontroller"] direction TB CORE[CPU Core] FLASH_INT[Flash Memory] SRAM_INT[SRAM] PERIPH_INT["Integrated Peripherals\nGPIO, UART, SPI, I2C\nADC, PWM, Timers"] CORE <--> FLASH_INT CORE <--> SRAM_INT CORE <--> PERIPH_INT end

An application-processor system commonly needs external DRAM, boot storage, several power rails, and controlled PCB routing. A microcontroller still needs proper decoupling, reset and boot strapping, and sometimes an external clock or programmer.


Inside a Microprocessor

A microprocessor contains only the processing core:

flowchart TD subgraph DIE ["Microprocessor Die"] PC[Program Counter] IR[Instruction Register] CU2[Control Unit] ALU2[ALU] REGS2["General Purpose\nRegisters"] CACHE["Cache Memory\n(in modern devices)"] BUS_IF["Bus Interface Unit"] PC --> IR IR --> CU2 CU2 --> ALU2 ALU2 <--> REGS2 CU2 --> BUS_IF CACHE <--> BUS_IF end EXT_BUS["External System Bus\n(goes to RAM, ROM, I/O chips)"] BUS_IF <--> EXT_BUS

Historically, RAM, ROM, timers, and communication peripherals were external. Current application processors frequently integrate many peripherals and controllers but still rely on external DRAM and boot storage. Inspect the selected part's block diagram.


Inside a Microcontroller

A microcontroller integrates everything onto one die:

flowchart TD subgraph MCU_DIE ["Microcontroller Die — e.g. STM32F103"] CORE2["ARM Cortex-M3 Core\n72 MHz"] subgraph MEM_BLOCK ["Memory"] FL["Flash\n128 KB\nProgram Storage"] SR2["SRAM\n20 KB\nData Storage"] end subgraph PER_BLOCK ["Peripherals"] GPIO2["GPIO\n37 I/O Pins"] UART2["USART × 3"] SPI2["SPI × 2"] I2C2["I2C × 2"] ADC2["12-bit ADC\n10 channels"] TIM2["Timers × 7"] USB2["USB 2.0 FS"] CAN2["CAN Bus"] end CORE2 <--> MEM_BLOCK CORE2 <--> PER_BLOCK end PINS["Physical Pins\n(48-pin LQFP package)"] PER_BLOCK --> PINS

One chip. One package. Directly programmable. This is why microcontrollers dominate embedded design.


The Spectrum From MCU to MPU

It is not a binary choice. There is a spectrum:

flowchart TD classDef mcu fill:#dcfce7,stroke:#16a34a,color:#14532d classDef mid fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a classDef mpu fill:#fee2e2,stroke:#dc2626,color:#7f1d1d A["8-bit MCU — ATtiny10\n32 B RAM · No OS\nBlink an LED · Costs ₹20"]:::mcu B["32-bit MCU — STM32L4\n640 KB Flash · FreeRTOS\nSensor hub · BLE device"]:::mcu C["MCU with MMU — STM32MP1\nLinux capable · 800 MHz\nIndustrial HMI · Camera"]:::mid D["Application Processor — Raspberry Pi CM4\n4 GB RAM · Full Linux\nCamera system · Web server"]:::mpu E["Server CPU — AMD EPYC\nTBs of RAM · 128 cores\nData centre · Cloud VM"]:::mpu A -->|"more power\nmore memory"| B B -->|"need an OS?"| C C -->|"need Linux\n+ file system?"| D D -->|"need massive\nparallelism?"| E

The boundary blurs around memory scale, integration, and software expectations. An MMU enables the process isolation and virtual memory expected by mainstream Linux distributions, although Linux variants can run without one.


Key Differences Table

Feature Microprocessor Microcontroller
CPU Yes Yes
RAM External On-chip (SRAM)
Flash / ROM External On-chip
Peripherals External chips On-chip (GPIO, UART, ADC...)
Clock speed MHz to GHz MHz to hundreds of MHz
Power consumption Watts Milliwatts to microwatts
Cost Higher (+ external chips) Lower (single chip)
PCB complexity High Low
OS Full OS typically Bare-metal or RTOS
MMU Usually present in application processors Usually absent; an MPU is more common
Typical use PC, phone, server, HMI Sensor nodes, actuators, appliances
Examples Intel Core, ARM Cortex-A AVR, PIC, STM32, ESP32

Memory Map: Microprocessor vs Microcontroller

On a microprocessor system, external chips occupy regions of the address space — the CPU sees them as memory:

flowchart TD subgraph MPUMEM ["Microprocessor Address Space"] direction TB M1["0xFFFF — ROM / BIOS"] M2["0x8000 — RAM\n(external DRAM chip)"] M3["0x4000 — I/O Space\n(external UART chip at 0x4000)"] M4["0x0000 — Interrupt Vectors"] end subgraph MCUMEM ["Microcontroller Address Space (STM32)"] direction TB N1["0xE000 0000 — ARM Core Peripherals\n(NVIC, SysTick)"] N2["0x4000 0000 — Peripheral Registers\n(UART, SPI, GPIO — on-chip)"] N3["0x2000 0000 — SRAM\n(on-chip, 20 KB)"] N4["0x0800 0000 — Flash\n(on-chip, 128 KB)"] N5["0x0000 0000 — Aliased boot region"] end

On the microcontroller, everything is on-chip. On the microprocessor, external chips must be mapped into address space — requiring address decoding logic on the PCB.


How Peripherals Connect: The Bus Architecture

Inside a microcontroller, peripherals are not randomly connected — they sit on internal buses with different speeds:

flowchart TD CORE3["ARM Cortex-M Core"] AHB["AHB Bus\n(High speed — 72 MHz)\nAdvanced High-performance Bus"] APB1["APB1 Bus\n(36 MHz)\nAdvanced Peripheral Bus 1"] APB2["APB2 Bus\n(72 MHz)\nAdvanced Peripheral Bus 2"] CORE3 --> AHB AHB --> APB1 AHB --> APB2 AHB --> DMA["DMA Controller"] AHB --> FLASH2["Flash Interface"] AHB --> SRAM2["SRAM"] APB1 --> UART3["USART2, USART3"] APB1 --> SPI3["SPI2"] APB1 --> I2C3["I2C1, I2C2"] APB1 --> TIM3["TIM2–TIM7"] APB2 --> GPIO3["GPIO Ports A–E"] APB2 --> UART4["USART1"] APB2 --> SPI4["SPI1"] APB2 --> ADC3["ADC1, ADC2"] APB2 --> TIM4["TIM1"]

Many MCUs gate peripheral clocks to save power. Access while gated is device-specific: writes may be ignored, retained, or cause a bus fault. Follow the reference manual's enable sequence and read-back requirements.


When to Choose Each

flowchart TD START[What does your system need?] --> Q1{Need to run Linux\nor full OS?} Q1 -- Yes --> Q2{Budget and PCB\nspace available?} Q2 -- Yes --> MPU2[Application Processor\ne.g. Raspberry Pi CM4\nBeagleBone, i.MX6] Q2 -- No --> MCU_OS[MCU with Linux support\ne.g. STM32MP1\nMicrochip SAMA5] Q1 -- No --> Q3{Complex computation\nor rich UI?} Q3 -- Yes --> MCU_HI[High-end MCU\ne.g. STM32H7, ESP32-S3\nNXP i.MX RT] Q3 -- No --> Q4{Battery powered\nor ultra-low power?} Q4 -- Yes --> MCU_LP[Low-power MCU\ne.g. STM32L0/L4\nATtiny, nRF52] Q4 -- No --> MCU_GP[General MCU\ne.g. STM32F4\nArduino Mega]

Real-World Examples Side by Side

Project Device Why
Thermostat STM32L0 MCU Reads one sensor, drives one display, battery powered
Washing Machine Controller PIC18F MCU Fixed program, motor + sensor control, cost sensitive
Industrial Robot Joint STM32H7 MCU Fast PWM, encoder reading, deterministic real-time
IP Camera ARM Cortex-A (MPU) Linux, H.264 encode, network stack, file system
Smartwatch nRF52 MCU + app processor MCU for BLE + sensors, MPU for display/UI
Car Engine ECU Renesas RH850 MCU Functional safety, real-time sensor fusion, no OS overhead

Worked Selection Example

A battery sensor samples at 1 kHz, runs a small filter, transmits once per minute, and must wake in under 100 µs. It needs neither Linux nor a display.

  1. Deterministic sampling and fast wake favor an MCU.
  2. Estimate memory from code, stack, and buffers; do not choose by frequency alone.
  3. Check sleep current, ADC behavior, DMA, and worst-case active current.
  4. Confirm package pins, toolchain support, and lifecycle.

An MPU can perform the computation, but DRAM refresh, boot time, and multi-rail power work against these requirements.

Common Mistakes and Practical Checks

  • Choosing by MHz: measure workload latency and energy per task.
  • Calling a module an MPU: separate chip, SoC, and module requirements.
  • Assuming integration removes support parts: verify decoupling, reset, clock, boot, and programming circuits.
  • Assuming every MCU is deterministic: include wait states, DMA contention, caches, and interrupt priority.
  • Choosing Linux late: decide early whether process isolation, storage, networking, and updates justify an MPU.

Summary



Next: Microcontroller Internals

Further Reading

Mind Map

mindmap root((MCU or MPU)) Core idea MCU integrates memory and I O MPU uses large external memory SoC and module differ Applications MCU control and sensing MPU Linux and rich UI Hybrid split workloads Calculations Energy equals power times time Memory equals code plus data Include worst case latency Design rules Start from software needs Size memory and bandwidth Budget power and boot Check package pins Practical checks Rails and decoupling Clock reset and boot Toolchain and lifecycle Common mistakes Choosing by MHz Confusing module and MPU Omitting support parts Ignoring real time jitter