Join Us

Microcontroller vs Microprocessor - Practical Differences

Author: Shirley

May. 13, 2024

Microcontroller vs Microprocessor - Practical Differences

If you are looking for more details, kindly visit microcontroller vs sbc.

I’ve recently started a livestream series on the MicroType Engineering YouTube channel called the “Live Lecture Series”. The theme of this series is to delve into specific topics in a livestream format. The first topic I covered was “Microprocessor vs Microcontroller”. Users submit questions to an online form that I review and answer at the end of the lecture. I am always on the lookout for new subjects to cover, so please let me know if you have any suggestions.

 

Microcontroller vs Microprocessor – Practical Differences

The first topic addresses something frequently discussed, but often the focus is too much on the intricate details rather than the bigger picture. This lecture aims to zoom out and not only identify the major differences between a microcontroller and a microprocessor, but also explain why one would be used over the other.

PDF version of the slide deck from the livestream: Microcontrollers vs Microprocessors – Live Lecture Series #1

This article will summarize my lecture and provide some additional information that will hopefully be helpful to you. However, I highly recommend watching the full YouTube stream for the most comprehensive understanding of the topic.

 

What Does Google Say?

If you search Google for the differences, you'll find numerous articles and charts like the one above. While these sources are generally accurate, they don’t convey the entire story. I won’t reiterate what's in the chart; instead, I encourage you to review it yourself.

I would, however, like to highlight a few statements: “Cannot be used in compact systems and hence inefficient”, “Most of the microprocessors do not have power-saving features“, and “Mainly used in personal computers”. These statements are, at best, oversimplified. At worst, they're simply incorrect. As with everything in electronics design, there are always exceptions and specifics depending on the application.

 

Definitions and Examples

Unfortunately, terminology in this field can vary, describing essentially the same concepts in different ways. For this article, and in general discussions, I will use the following definitions:

MCU: Microcontroller – Processor + Storage + Peripherals* + Power Management.

MPU: Microprocessor – Simply the Processor.

SBC: Single Board Computer – Everything needed to run a desktop OS on a single board.

*Some peripherals still require external PHY’s/hardware (Ethernet).

Here are some common examples of Microcontrollers and Microprocessors:

MCUs:

  • Microchip ATMEGA328 (Arduino)
  • STMicro STM32
  • Espressif ESP32

MPUs:

  • BCM28xx/BCM2711 (Raspberry Pi)
  • AM335x (Beagle Bone)
  • Jetson Nano (Tegra K1)
  • Computer CPUs

Generally, MPUs offer more processing power and memory, while MCUs are cheaper and easier to develop for. Although this is mostly true, it doesn’t capture the full picture when comparing a microprocessor to a microcontroller.

 

Real World Example

To make the comparison more concrete, I'll share a real-world example from a job proposal we handled.

It involved an audio mixer that took in multiple audio channels, applied mixing and filters, and outputted a single audio stream.

We proposed two different solutions:

MCU-based approach: Utilized a combination of analog components and digital ICs. The MCU controlled the analog blocks and ICs.

MPU-based approach: All audio was fed directly into the MPU, which managed all mixing and filtering. The output was then processed by the MPU.

Both approaches would work, but there were significant differences between them.

Microprocessor Solution

  • Highly flexible
  • Less external audio hardware
  • Potential to be cheaper
  • Simple software implementation using existing libraries

Microcontroller Solution

  • Limited flexibility
  • Required extensive analog and digital hardware
  • Real-time audio with minimal latency

Our Answer

Ultimately, we proposed a Microcontroller-based solution. One of the client's main criteria was minimal audio latency, making the MPU solution challenging to implement effectively.

 

Microprocessor vs Microcontroller Operating Systems

One key difference is the existence of an operating system. Microcontrollers typically run bare-metal code or use a Real-Time Operating System (RTOS), while microprocessors usually run a true OS, typically a Linux variant.

Running Linux on an embedded system allows complex tasks to be managed in software, tasks that would be nearly impossible using a bare-metal approach.

Note: MCUs can technically run a true operating system, but it is uncommon, so I won't cover that scenario here.

 

Why is Designing with Microprocessors Difficult?

Many comparison charts state that designing with an MPU is more difficult, and hardware-wise, this is accurate.

Most MPUs use BGA packages, often fine-pitch, high pin count BGAs. Experienced design shops won’t have issues, but it’s a consideration.

MPUs require external RAM and Flash (some have onboard flash, but additional memory is often needed). More RAM/Flash increases hardware complexity, including high-speed interfaces requiring higher layer count PCBs with controlled impedances.

Finally, setting up Linux can be challenging, heavily reliant on vendor support. Common Linux distributions include Ubuntu/Debian, Yocto, and BuildRoot.

 

Dealing with Real-Time Requirements

Real-time response often determines whether to use a microcontroller or a microprocessor. Due to the OS, MPUs are inherently not real-time systems. This isn’t an issue for some applications, but it's critical for others.

If real-time response and Linux are both required, options include:

An MPU can act as the system controller, communicating with an external MCU to handle time-sensitive functions. This hybrid approach is common in industry.

Also, some modern MPUs include secondary co-processors for real-time tasks. The STM32MP1, for example, features this capability.

How Do I Choose?

For new designs, we typically default to using a microcontroller. Most applications we encounter are best served this way.

However, if the project involves:

  • Intensive computations
    • Computer vision
    • Machine learning
    • Complex mathematical calculations
    • Onboard graphics processing
  • Significant memory needs
    • Driving displays
    • Managing large LED arrays
  • Specific interfaces
    • High-speed USB
    • HDMI
    • Ethernet

we consider a microprocessor instead of a microcontroller.

If we believe an application requires a true OS for optimal performance, we lean towards using a microprocessor. If real-time interfaces are needed, additional microcontrollers are typically incorporated to handle those tasks.

The company is the world’s best mt8766 supplier. We are your one-stop shop for all needs. Our staff is highly specialized and can help you find the product you require.

Conclusion

Many articles discuss microcontrollers vs. microprocessors. Instead of a simple pros/cons contrast, this article used real-world examples. While specific applications require either a microcontroller or a microprocessor, often both can work. The decision is usually based on BOM cost and design time.

MicroType Engineering has extensive experience designing systems based on both microcontrollers and microprocessors. With full firmware support, we can assist with all parts of the design process. Reach out to learn how MTE can help kickstart your new design today!

All about CPUs: Microprocessor, Microcontroller and ...

Ever heard of CPUs? Then you must have come across these terms: Microprocessor (MPU), Microcontroller (MCU), and Single Board Computer (SBC). But did you know they’re actually very different yet similar in some ways? Confused? No fret! Today, we will examine each of their differences and uses in our day-to-day lives!

Before we dive into each of them, let's briefly discuss the CPU, as this is where all processors begin!

What is the CPU?

Old CPU
Ref: pcworld

Simply put, the CPU is the core component in a computing unit, responsible for processing and executing instructions. It runs the operating system and applications, constantly receiving input from the user or active software programs.

Now that you have a basic understanding of the CPU, let’s look into Microprocessors (MPU), Microcontrollers (MCU), and Single Board Computers (SBC) in detail!

What is a Microprocessor (MPU)?

The Microprocessor (MPU) is also known as a Micro Processing Unit, the central unit of a computer system, performing arithmetic and logic operations. It essentially functions as a CPU on an integrated circuit.

How does an MPU work?

An MPU accepts binary data as input, processes it according to instructions stored in its memory, and provides results (also in binary form) as output.

To understand how it works better, refer to the basic block diagram below:

Ref: Javapoint

A microprocessor consists of an ALU, control unit, register array, and Memory Unit:

  • ALU (Arithmetic and Logical Unit): Performs arithmetic and logical operations on the data received from an input device or memory
  • Control unit: Controls instructions and data flow within the computer
  • Register array: Includes registers identified by letters and accumulator
  • Memory Unit: Stores data

Basic Terms to Note

  • Bus: Set of conductors transmitting data, addressing, or control information to the microprocessor’s different elements (MPU usually has three types: data bus, address bus, and control bus)
  • Clock Speed: Measures speed at which a microprocessor executes instructions, usually in MHz (megahertz) or GHz (gigahertz)
  • Instruction Set: Series of commands that a microprocessor can understand, essentially the interface between hardware and software
  • Word Length: The number of bits in the processor’s internal data bus (an 8-bit MPU can process 8-bit data at a time)
  • Cache Memory: Stores frequently referenced data or instructions, increasing overall speed as it allows quicker access for the processor

Categories of MPU

Reduced Instruction Set Computer (RISC)

  • Uses fewer instructions
  • Simpler circuits
  • Operates faster
  • More registers
  • Uses more RAM
  • Fixed number of clock cycles

Complex Instruction Set Computer (CISC)

  • Opposite of RISC
  • More instructions
  • Complex circuits
  • Operates slower
  • Uses less RAM
  • Fewer registers
  • Numerous clock cycles

Popular MPUs

  • Intel
  • AMD

Applications of MPU

  • Automobiles
  • Credit card processing units
  • Security systems
  • Household devices

What is a Microcontroller (MCU)?

The microcontroller, also known as a Microcontroller Unit, is an integrated circuit (IC) device used for controlling other portions of an electronic system, usually via an MPU, memory, and some peripherals.

How does an MCU work?

MCUs basically take inputs from the devices they control and manage control by sending signals to different parts of the device. They usually run a specific program dedicated to a single task, making them comparably less powerful than MPUs.

Here’s a block diagram of an MCU to help you understand better:

A microcontroller typically consists of CPU, Memory (RAM and ROM), Timer, I/O ports, Serial Ports, Interrupt Control:

  • CPU: The brain of the MCU, responsible for fetching, decoding, and executing instructions
  • Memory: Similar to MPU, used to store data and programs (MCUs have RAM and ROM or flash memories for program storage)
  • Timer: Manages timing and counting functions inside the microcontroller, used for clock functions, modulations, etc.
  • I/O Ports: Allow interfacing various devices (e.g., LCDs, LEDs, printers, memories) with the microcontroller
  • Serial Ports: Provide serial interfaces between the microcontroller and other peripherals
  • Interrupt Control: Delays the working program, interrupt can occur internally or externally

Types of MCUs

  • 8-bit: Most cost-effective and widely used
  • 16-bit
  • 32-bit

Popular MCUs

  • ATMega328
  • ESP32

Applications of MCU

  • Communication systems
  • Robotics
  • Peripheral controllers in PCs
  • Biomedical instruments
  • IoT

What is a Single Board Computer (SBC)?

Single Board Computers are small computing devices that have all the elements of a complete computer on a single board. They are low cost, self-contained, and can be easily connected to other hardware.

How does an SBC work?

SBCs use a System-on-Chip (SoC), integrating most components of a computer. They function like an MPU but also handle tasks like signal processing, wireless communication, and artificial intelligence, in addition to data transmission.

Here’s an SBC block diagram to help you visualize better:

An SBC looks like a combination of both MPU and MCU but with more functions:

  • CPU/SoC: The brain of the SBC, responsible for fetching, decoding, and executing instructions
  • Memory: Similar to MPU and MCU, used to store data and programs (RAM and ROM or flash memories for program storage)
  • Clock/Timer: Manages timing and counting functions inside the microcontroller, used for clock functions, modulations, etc.
  • I/O Ports: Allow interfacing various devices (e.g., LCDs, LEDs, printers, memories) with the microcontroller
  • Serial Ports: Provide serial interfaces between the microcontroller and other peripherals
  • ADC/DAC: Converts signals between analog and digital forms
  • Wireless Connectivity: Includes Bluetooth and Wi-Fi

Popular SBCs:

  • Raspberry Pi
  • NVIDIA
  • Rock Pi

Applications of SBCs

  • Programming
  • Embedded applications
  • Backplanes
  • Robotics
  • Home automation

Comparison between Microprocessor, Microcontroller, and Single Board Computer

Microprocessor (MPU) Microcontroller (MCU) Single Board Computer (SBC)

The heart of a computer system

The heart of an embedded system

Microcomputer

Memory and I/O components have to be connected externally

Has external components with internal memory and I/O components

Has external components with internal memory and I/O components

Unable to use in compact systems

Able to use in compact systems

Able to use in compact systems

Cost of the system is higher

Cost of the system is lower

Cost of the system is lower

Since memory and I/O components are external, each instruction goes through an external operation, making it slower

Components are internal, with operations taking place internally, making it faster

Components are internal, with operations taking place internally, making it faster

109

0

Comments

0/2000

All Comments (0)

Guest Posts

If you are interested in sending in a Guest Blogger Submission,welcome to write for us!

Your Name: (required)

Your Email: (required)

Subject:

Your Message: (required)

0/2000