1. What is the difference between a microcontroller and a microprocessor?
A strong answer covers:
- Microcontroller has CPU, flash, RAM and peripherals on one chip
- Microprocessor needs external memory and peripherals
- MCUs are low cost, low power, for dedicated tasks
- MPUs run rich operating systems like Linux
- Examples of each
Show model answer
A microcontroller, or MCU, puts a CPU core, flash memory for the program, RAM and peripherals such as GPIO, timers, ADC, UART, SPI and I2C on a single chip. It is designed for a dedicated job, like controlling a washing machine, with low cost and very low power, and usually runs bare-metal code or a small RTOS. Examples are STM32 with Cortex-M cores, ESP32 and the RP2040. A microprocessor, or MPU, is a more powerful CPU that needs external RAM, storage and often extra chips for peripherals. It typically has a memory management unit and runs a full operating system like Linux or Android. Examples are the ARM Cortex-A chips in a Raspberry Pi or phones. Choosing between them depends on the need: an MCU for real-time control and battery life, an MPU for rich UIs, networking stacks and heavy processing.