MCU vs MPU: Microcontroller vs Microprocessor Compared

A microcontroller (MCU) puts a processor, flash memory, RAM and peripherals such as timers, ADCs and communication interfaces on one chip, so it can run a complete small system by itself. A microprocessor (MPU) is mainly a faster processor that needs external DRAM and storage, and usually runs a full operating system such as Linux. MCUs suit simple, low-power, real-time control; MPUs suit complex, software-rich devices.

AspectMCUMPU
IntegrationCPU, flash, RAM and peripherals (GPIO, timers, ADC, UART, SPI, I2C) on one chipCPU cores with caches and an MMU; DRAM and storage are external chips
Clock speedAbout 1 MHz to a few hundred MHzHundreds of MHz to several GHz
MemoryKilobytes to a few megabytes of on-chip flash, and kilobytes to megabytes of SRAMExternal DRAM (hundreds of MB to GB) and storage such as eMMC or SD
SoftwareBare-metal code or a small real-time OS (such as FreeRTOS or Zephyr)A full operating system such as Linux or Android
Real-time behaviorPredictable, with interrupt latency of microsecondsHarder to guarantee on Linux without real-time extensions
PowerVery low: microamps in sleep, and a coin cell can last yearsHigher: hundreds of milliwatts to watts
Boot timeInstant, in millisecondsSeconds, because a boot loader and OS must start
Cost and board designCheap chip, simple board, few external partsMore expensive chip plus DRAM and power chips, and a complex multilayer board
Typical usesAppliances, motor control, sensors, wearables, automotive ECUsSmartphones, tablets, set-top boxes, routers, industrial touchscreens, infotainment
ExamplesSTM32, ESP32, RP2040, Arduino boardsApplication processors such as NXP i.MX, TI Sitara and the chip in Raspberry Pi

Figures are typical orders of magnitude and vary by process generation and product.

When to use which

MCU
When the job is control and sensing, you need very low power and instant start, and the program fits in on-chip memory.
MPU
When you need a rich user interface, networking, a file system or large software stacks that rely on an operating system.
Both
Many products combine them: an MPU runs the user interface and applications, while an MCU handles time-critical control and power management.

FAQ

What is the difference between a microcontroller and a microprocessor?

A microcontroller integrates a CPU, flash, RAM and peripherals on one chip and runs a small system by itself. A microprocessor is mainly the CPU, needs external DRAM and storage, and usually runs an operating system such as Linux.

Is the Raspberry Pi a microcontroller?

No. The Raspberry Pi uses a microprocessor-class chip with external memory and runs Linux. The Raspberry Pi Pico is a microcontroller board.

Which uses less power?

A microcontroller. It can sleep at microamps and run for years on a coin cell, while a microprocessor draws hundreds of milliwatts to watts.

Can a microcontroller run Linux?

Generally no, because Linux needs an MMU and much more memory than a typical MCU has. Microcontrollers usually run bare-metal code or a small real-time operating system.

Check your understanding

When using a microcontroller GPIO (general-purpose input/output) pin, what must be configured first?

  1. AWhether the pin is used as an input or an output (its direction)
  2. BThe color of the pin
  3. CThe name of the programmer who wrote the code
Show answer and explanation

Answer: A. Whether the pin is used as an input or an output (its direction)

A GPIO pin can be used as either an input or an output under software control. Configured as an output through the direction register, the value written to the output register becomes the pin voltage; configured as an input, the pin voltage can be read from the input register. Most microcontrollers also let you set pull-ups, the output type (push-pull or open-drain) and whether the pin serves another peripheral.

Which method is commonly used by microcontrollers to adjust LED brightness or motor speed?

  1. AMaking the power wires thicker or thinner
  2. BTemporarily halting program execution
  3. CPWM, switching on and off rapidly and varying the fraction of on time
Show answer and explanation

Answer: C. PWM, switching on and off rapidly and varying the fraction of on time

Driving an LED or motor on and off rapidly with PWM makes the LED appear as bright as its on-time fraction, and the motor, through inertia, turns at a speed set by the average power. The transistor operates fully on or fully off, so it dissipates less heat than at intermediate voltages, giving efficient control. The frequency is chosen so that LED flicker and motor noise are not noticeable.

What is a characteristic of serial communication with a UART?

  1. AThe sender drives a clock wire, and the receiver samples data with that clock
  2. BNo clock wire is used; both sides agree on a communication speed (baud rate), and a start bit marks each character
  3. CMany devices share one wire and are selected by address
Show answer and explanation

Answer: B. No clock wire is used; both sides agree on a communication speed (baud rate), and a start bit marks each character

A UART communicates asynchronously over two wires, transmit and receive (plus ground). The line idles at 1; a 0 start bit marks the beginning of a character, followed by the data bits and a 1 stop bit at the end. No clock is sent, so both sides must be configured for the same speed, such as 115200 bps. UARTs are commonly used for debug output and for connecting GPS and radio modules.

  1. What is the difference between polling and interrupts as ways to learn a peripheral's status?
  2. When a microcontroller captures many A/D conversion results at regular intervals, what is the advantage of using DMA?

Practice Embedded Systems & Firmware questions

Key terms explained

Microcontroller
A small computer that integrates a CPU, memory and peripherals such as timers and ADCs on one chip. It is embedded in appliances, cars and other equipment to control them. Also called an MCU.
GPIO
General-purpose input/output: microcontroller pins that software can configure as inputs or outputs, used for reading switches, lighting LEDs and so on.
Interrupt
A CPU mechanism that temporarily suspends the current task to handle a request, for example from an external device, and then returns to the original task.

Related comparisons