Atlas Robotics
MicrocontrollersBasic

What is embedded programming? How microcontrollers (MCUs) differ from microprocessors (MPUs)

Atlasbot · 20/8/2026 · 10 min read

What is embedded programming? How microcontrollers (MCUs) differ from microprocessors (MPUs)
MCU integrates everything in 1 chip, MPU needs external components to operate

The Arduino Uno and the Raspberry Pi are both small, programmable boards, often mistaken for being "the same device" — but actually belong to two different worlds in terms of architecture: Arduino uses microcontroller (MCU), Raspberry Pi uses microprocessors (MPU). Understanding this difference properly is the first step before choosing the right "brain" for each part of a robotics project.

What is embedded programming?

embedded programming (embedded programming) is writing software that runs on a specialized hardware device (usually with limited resources: less RAM, less memory, lower processing speed than a regular computer) to perform one or a few specific tasks — different from regular application programming that runs on a general-purpose computer with a full operating system.

microcontroller (MCU) — everything in 1 chip

MCU (Microcontroller Unit) integrates all in a single chip: processor core (CPU), RAM memory, program memory (Flash), and peripherals (GPIO, ADC, UART, timer...). Just need to power up and load the program, the MCU runs immediately — no operating system required, no external hard drive/memory card needed, no external RAM needed.

The Arduino (ATmega328P), STM32, and microcontrollers in general fall into this category — programs run directly on the hardware (called "bare-metal" or via a very lightweight real-time operating system — RTOS), without a full operating system layer like Windows/Linux.

Microprocessor (MPU) — just the "brain", requires external components

The MPU (Microprocessor Unit), or CPU in general, is just the processing core — no available RAM, program memory, or most of the peripherals on the same chip. To operate, the MPU needs to assemble additional RAM, removable storage (eMMC/SD card/SSD), and usually run a full operating system (Linux) to manage resources.

Raspberry Pi, Jetson Orin Nano belong to this group — this is why these boards need a microSD card to boot the operating system, unlike Arduino, which only needs to load the code and run immediately.

In short: MCU = "all in 1", runs immediately without OS, limited resources. MPU = just CPU, needs discrete RAM/storage and usually runs full Linux, much more powerful but more complex and power consuming.

Quick comparison table

CriterionMCU (VD: Arduino, STM32)MPU (VD: Raspberry Pi, Jetson)
RAM/FlashBuilt-in on chipRequires external RAM/storage
Operating systemNo need (bare-metal/RTOS)Need (usually full Linux)
Boot timeAlmost instantaneouslyA few seconds to tens of seconds (boot OS)
Calculate real-timeVery good, can ensure accurate response timeLess reliable (OS may lag due to multitasking schedule)
Computational performanceLowMuch higher
Electricity consumptionVery low (µA to mA)Much higher (W)

When to choose MCU, when to choose MPU

MCUs are suitable for tasks requiring accurate real-time feedback and low power consumption — high-speed PID loop motor control, encoder reading via interrupt, high-frequency sensor communication. MPU is suitable for tasks that need large computing performance — running ROS2, SLAM, AI image processing — things that MCU cannot handle.

This is why real AMR architectures (like the projects in the Projects section of this site) are commonly used both combined: an MCU (Arduino/STM32) takes care of the low-speed real-time motor control layer, an MPU (Raspberry Pi/Jetson) takes care of the high computing layer (SLAM, Nav2) — each does what it does best.

Technical details

Parameters

The resource difference between MCU and MPU is much larger than a generic "stronger/weaker" number:

Arduino Uno (MCU)STM32F103 (MCU)Raspberry Pi 4 (MPU)
RAM2KB20KB1-8GB (~500,000 times more)
Program memory32KB Flash64KB FlashmicroSD card (tens of GB)
Pulse16MHz72MHz~1.5GHz, 4 cores

Register / Bit / Byte

The deeper difference "with OS or not" lies in how to access the hardware: on MCU, the code directly accesses the hardware register (memory-mapped register, eg: GPIOA->ODR mentioned in the GPIO article) — the latency is almost fixed, accurately predictable. On MPUs running Linux, application code is not allowed to directly touch the hardware — must go through the driver in the kernel using syscalls (eg: read/write GPIO on Raspberry Pi via library calls ioctl() to /dev/gpiochip0) — there is additional delay due to user-space/kernel-space context switching, and this delay is not fixed because it depends on the OS's multitasking schedule at the time call point.

Practical applications

In the Atlas A2 architecture, the ESP32 (MCU) takes care of the safety layer — emergency stop button, collision sensor — where response latency must be accurate to within a few microseconds; while the Jetson Orin Nano (MPU) runs YOLO for object recognition and Nav2 for navigation, tasks that accept latency fluctuations of a few tens of milliseconds but require thousands of times more computational performance than the MCU. Pairing the wrong role — for example, pushing safety logic to an MPU running Linux — can cause the robot to react slowly when it needs to stop most urgently.

Common mistakes

  • Mistaking Arduino as a "mini computer" — Arduino does not run an operating system, there is no concept of "software installation" like a computer, it only runs exactly one pre-loaded program until another program is loaded.
  • Assuming that MCU is always "weaker" than MPU, so it is less valuable — not true, MCU has its own advantages in real-time and extremely low power consumption that MPU running Linux cannot guarantee (because the OS has multitasking schedule delay that is not accurately predetermined).
  • Choose MPU for tasks that require strict real-time — For example, high-speed PID control loops for motors running directly on Linux (not RTOS) may experience unusual delays because the OS is busy processing other things, causing unwanted oscillations — so push strict real-time control loops down to the MCU.
  • Choose MCU for compute-intensive tasks — trying to run SLAM or AI image processing directly on the MCU (RAM is only a few KB to a few hundred KB) is almost impossible — these tasks require MPUs.

Conclusion

MCU and MPU are not "which is better" but are two tools for two different problems - MCU for real-time and power saving, MPU for high computing performance. Real robots often need both, coordinated via UART/SPI/I2C communication. The next article in the category starts with specific MCU boards — Arduino, the most popular platform to start learning embedded programming.

Get new articles and lessons by email

When a new technical article or course module is published, Atlas Robotics sends you a short email. No spam.

Unsubscribe any time with the link in each email. See our Privacy policy.

What is embedded programming? How microcontrollers (MCUs) differ from microprocessors (MPUs) — Atlas Robotics