Microcontrollers vs microprocessors
Two kinds of computer chip: one is a bare CPU that needs a board of helpers, the other a complete small computer in one package. What that changes in speed, power, cost and use.
In 30 seconds
A microprocessor is just the CPU. It needs separate memory, storage and input/output chips around it, and in return it can be very fast. It runs laptops, phones and servers.
A microcontroller puts a small CPU, memory, program storage and input/output on one chip. It is slow by comparison, but cheap, tiny and able to run on a battery.
Microcontrollers run one fixed program inside a product, such as a microwave or a car’s window motor. Microprocessors run an operating system and whatever programs you load.
Microcontrollers vs microprocessors, step by step
The line is blurry: phone chips combine a fast processor with many extras, and large microcontrollers can run small operating systems. Figures are typical examples, not limits.
- Step 1: Four parts of a computer. Any computer, large or small, needs four things: a CPU (processor) to carry out instructions, working memory (RAM) for the data in use, storage that keeps the program when the power is off, and input/output to reach the outside world. Microprocessors and microcontrollers package these differently.
- Step 2: Microprocessor: CPU only. A microprocessor, or MPU, is a CPU on a chip, and only that. To become a working computer it needs a circuit board carrying separate memory chips, storage and input/output chips. That makes the system bigger and dearer, but each part can be as large and as fast as the job demands.
- Step 3: Microcontroller: all in one. A microcontroller, or MCU, puts a modest CPU, a little RAM, flash storage for the program and input/output circuits on a single chip, usually with timers and converters for reading sensors. Give it power and it runs. Its pins connect straight to the buttons, sensors, lights and motors of the product it controls.
- Step 4: Performance: worlds apart. Take two common examples. The microcontroller in an Arduino Uno board runs at 16 MHz with 2 kilobytes of RAM and 32 kilobytes of program storage. A typical laptop processor runs at around 3 GHz and works with gigabytes of RAM. The small chip is not a slow laptop; it is sized for one small job.
- Step 5: Power and cost. Small and simple also means frugal. A microcontroller draws milliwatts, far less when asleep, so it can run for months or years on a small battery, and it often costs less than a dollar. A laptop or desktop processor draws tens of watts, needs a heat sink and usually a fan, and costs tens to hundreds of dollars.
- Step 6: One job, or any job. A microcontroller usually runs a single program stored in its flash, starting the moment power arrives and looping for as long as it lasts: read the inputs, decide, set the outputs. A microprocessor runs an operating system that loads and juggles many programs chosen by the user.
- Step 7: Where you find each. Microcontrollers sit unseen inside products: microwave ovens, thermostats, remote controls, toys, and dozens in a modern car. Microprocessors are the heart of things we call computers: laptops, phones, servers, games consoles. Many devices use both, a processor for the main work and microcontrollers for small chores.
Try it yourself
Learn this first
Learn next
- Communication protocols (I2C, SPI, UART)One byte crosses the wire three ways: UART, SPI and I2C, bit by bit. Intermediate
- Analog-to-digital conversionA smooth voltage becomes numbers: sample it on a clock, round it, write it in bits. Beginner
- Multi-core processorsWhy chips gained cores instead of clock speed, and what limits the gain from more cores. Beginner
Spotted a mistake on this page?