MICROCONTROLLER
Definition
A MICROCONTROLLER (often abbreviated MCU) is a complete system on a single chip that integrates: CPU, non-volatile memory (for firmware), volatile memory (for temporary data), and a wide set of INPUT/OUTPUT peripherals. Unlike a classic CPU or MICROPROCESSOR (often abbreviated MPU), which typically require external memories and peripherals to form a working system, a MICROCONTROLLER is designed to be “stand-alone” and directly control sensors, actuators, and interfaces, with reduced cost, power consumption, and board space.

Key concept: a “miniature computer”
A MICROCONTROLLER combines on one die what an MPU-based system spreads across multiple components:
CPU: executes instructions and handles interrupts and control flow.
Permanent (non-volatile) memory: typically FLASH or ROM, stores the firmware.
Volatile memory: typically RAM, stores variables, stack, and runtime buffers.
INPUT/OUTPUT: GPIO lines and integrated peripherals (timers, serial interfaces, analog conversion, etc.).
This makes an MCU ideal for control, automation, and acquisition tasks.
Typical internal architecture
Inside a typical MCU you almost always find:
Clock and reset: internal/external oscillator, PLL (on many families), reset circuits and watchdog.
Internal buses: interconnect CPU, memories, and peripherals (often with priority/arbitration).
Interrupt controller: manages asynchronous events (timer, pin, serial, ADC, etc.).
Digital peripherals: TIMER, PWM, counters, capture/compare.
Communication peripherals: UART, SPI, I2C, sometimes CAN, USB, ETHERNET (depending on class).
Analog peripherals (if present): ADC, DAC, comparators, internal references.
Power management: sleep/deep sleep, clock gating, supply domains, brown-out detection.
Memories: permanent vs volatile
Non-volatile memory (FLASH/ROM): retains the program when powered off. This is the “permanent memory” holding the firmware.
Volatile memory (RAM): loses data when powered off. Used for variables, stack, communication buffers, and temporary runtime data.
Other possible memories: EEPROM (or EEPROM emulation in FLASH) for parameters that must persist but are updated occasionally (calibration, IDs, configuration).
INPUT/OUTPUT: what it really means
INPUT/OUTPUT channels are not only “pins that read or write 0/1”. In a modern MCU, most pins are multiplexed: the same pin can be GPIO or a peripheral signal (e.g., UART TX/RX, SPI MOSI/MISO/SCK, ADC input, PWM output). This provides flexibility but requires careful configuration of port registers and alternate functions.
Why an MCU differs from a “classic” CPU/MPU
An MCU is oriented to real-time control, often with frequent interrupts and tightly integrated peripherals.
An MPU is oriented to general-purpose performance and complex systems (typically with external RAM, mass storage, high-speed interfaces, and often a full OS).
An MCU tends to run bare-metal firmware or lightweight RTOS; an MPU tends to run heavier operating systems (Linux-like) when needed.
Sketch of the most important connections
┌──────────────────────────────────┐
│ MICROCONTROLLER (MCU) │
│ │
│ ┌─────────┐ ┌──────────────┐ │
Power ───────────► │ Clock/ │ │ CPU Core │ │
Reset/WDG ───────► │ Reset │ │ + Interrupt │ │
│ └─────────┘ └──────┬───────┘ │
│ │ │
│ ┌──────────────┐ │ │
│ │ FLASH / ROM │◄────┘ │
│ └──────────────┘ │
│ ┌──────────────┐ │
│ │ RAM │◄────────────────┘
│ └──────────────┘
│
│ Peripherals:
│ GPIO ──► digital sensors/actuators
│ TIMER/PWM ──► motors, LEDs, power control
│ UART/SPI/I2C ──► modules, sensors, displays
│ ADC/DAC ──► analog signals (if present)
└──────────────────────────────────┘
Typical advantages
Integration: fewer external components, simpler schematic.
Lower power: sleep modes and peripherals optimized for low-power.
Cost and size: shorter BOM and simpler PCB.
Reliability: fewer external interconnects and fewer failure points.
Determinism: interrupts and timers suited to real-time control.
Typical limitations
Limited resources: RAM and FLASH are often small compared to MPU systems with external memory.
Performance: the CPU is often less powerful than a dedicated MPU (class-dependent).
Peripheral constraints: number of channels and speeds are fixed by the chosen chip.
Updates and debug: require toolchains and interfaces (SWD/JTAG) aligned with the device family.
Table 1 – Typical blocks inside a MICROCONTROLLER
Block | Role |
|---|
CPU | Instruction execution, interrupt handling, system control |
FLASH/ROM | Permanent firmware storage |
RAM | Runtime data, stack, buffers |
GPIO | General-purpose digital INPUT/OUTPUT |
TIMER/PWM | Timing, counting, pulse generation, motor/LED control |
UART/SPI/I2C | Serial communications with external peripherals |
ADC/DAC | Analog interfaces (if present) |
Watchdog | Recovery from software lockups and supervision |
Power management | Sleep, clock gating, power reduction |
Table 2 – Summary comparison: MICROCONTROLLER vs MICROPROCESSOR
Aspect | MICROCONTROLLER (MCU) | MICROPROCESSOR (MPU) |
|---|
Integration | CPU + memories + I/O on the same chip | CPU, often with external memories and I/O |
Memory | Typically on-chip FLASH/ROM and RAM | External RAM is common, external storage |
Typical use | Real-time control, embedded, automation | Complex systems, GUI, heavy networking, full OS |
Power | Often very low (deep sleep) | Generally higher (class-dependent) |
HW complexity | Lower | Higher (external buses, DRAM, PHY, etc.) |
SW complexity | Bare-metal or lightweight RTOS | Often a full OS (Linux-like) |
Application examples
A MICROCONTROLLER is typical in: appliances, thermostats, IoT sensors, control units, motor control, instrumentation, embedded medical devices, keyboards/remotes, automotive subsystems (depending on requirements), and generally wherever reliable control is needed with constrained resources.