Embedded systems

Microcontroller (MCU)

A microcontroller is an entire tiny computer squeezed onto one chip: a processor core, a chunk of memory, and a fistful of input/output pins, all baked together so it can run by itself with almost nothing else attached. Where a desktop PC is a sprawling campus of separate buildings — CPU, RAM, graphics card, storage — an MCU is a one-room studio apartment where everything you need is within arm's reach. That self-contained design is why a $0.50 MCU can sit inside a toothbrush, a thermostat, or a car door and quietly do its one job for years.

Unlike a microprocessor (the chip in your laptop), an MCU brings its own program memory (flash), working memory (RAM), and peripherals — timers, ADCs, serial ports — onto the same die, so it needs only power and maybe a crystal to come alive. They are sold by the billions: a single modern car may hold 50–150 of them. Popular families include the 8-bit AVR (used in classic Arduinos), the 32-bit ARM Cortex-M (STM32, NXP, Raspberry Pi Pico's RP2040), and the Wi-Fi-equipped ESP32. You program them in C or C++, the compiled code lives in flash, and the chip runs that same program every time it powers up.

Microprocessor vs microcontroller is the classic exam trap: a microprocessor (CPU) needs external RAM, storage and I/O chips around it; a microcontroller integrates all of that on-chip, trading raw speed and capacity for low cost, low power, and dead-simple board design.

Also called
MCUsingle-chip computer單晶片