Home / Learn Embedded C / Microcontroller vs Microprocessor

Microcontroller vs Microprocessor

Why a microcontroller already has RAM, flash and peripherals built in, and a microprocessor does not.

Quick summaryWhy a microcontroller already has RAM, flash and peripherals built in, and a microprocessor does not.

How to think about this

MCU vs MPUMicrocontroller (MCU)Single chip: CPU + RAM + flash+ peripheralsKilobytes of RAM is normalRuns with no OS, or a tinyRTOSBoots your code inmicrosecondsCents to a few dollarsMicroprocessor (MPU)CPU only; needs externalRAM/storageMegabytes to gigabytes of RAMUsually runs a full OS (Linux,etc.)Boots in seconds, through abootloader + OSDollars to tens of dollars
MCU vs MPU

In plain terms

A microcontroller (MCU) packs a CPU, RAM, flash and peripherals (GPIO, timers, UART...) onto one chip; a microprocessor (MPU) is just the CPU and needs external RAM, storage and a full OS.

Why we use it

Picking the right category up front avoids over- or under-engineering a project: a blinking-LED toy does not need Linux, and a camera running a GUI usually cannot survive on an 8-bit MCU alone.

Under the hood

An MCU boots straight into your code from internal flash in microseconds; an MPU boots a bootloader, then usually an OS like Linux, from external storage, taking much longer and needing far more power and RAM.

Real-world use

  • Hardware selection
  • Product requirements planning

Try it

Comparing two typical RAM budgetsC: edit and run

This huge ratio is exactly why an MCU boots in microseconds from flash, while an MPU needs a bootloader and a full OS.

Where this course focuses

This entire course is about microcontrollers (AVR, STM32, ESP32 and similar) and the C code that runs directly on them, generally with no OS underneath.

Try it: comparing typical boot times

Comparing MCU boot time to MPU boot timeC: edit and run

An MCU runs your code directly from flash with no bootloader or OS to load, which is why it boots thousands of times faster than a Linux-based MPU.

Quick quiz

1. Which of these is true of a typical microcontroller?