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. It is called the “Live Lecture Series”. The theme of this series, as you can guess from the title, is to go into a specific topic in a livestream format. The first topic that I cover is “Microprocessor vs Microcontroller”. Users submit questions to an online form that I go over and answer at the end of the lecture. I am always looking for new topics to cover next, so please let me know any suggestions you may have.

 

Microcontroller vs Microprocessor – Practical Differences

The first topic covers something that is talked about a lot, but I feel sometimes too much focus is placed on the “nitty gritty” details instead of the big picture. The focus of this lecture is to zoom out, and determine not only what are the major differences between a microcontroller and a microprocessor, but more importantly, why would you use one over the other?

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

This post is going to summarize what I spoke about during the lecture, as well as add a bit of additional information that hopefully you find helpful. But I highly recommend you watch the full YouTube stream to gain the best picture on this topic as possible.

 

What Does Google Say?

If you search Google to find the differences, you will be inundated with articles and charts like the one above. While these statements are mostly true, it really doesn’t tell the whole story. I will not recite what is in the chart, instead I encourage you to read through it yourself.

I would like to point out a few statements though: “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”.  At best these are highly oversimplified statements. At worst, they are simply not true. Like everything in electronics design, there are always exceptions and distinctions depending on the application.

 

My Definitions and Examples

Unfortunately, there are a lot of different terms and wording in this space to describe essentially the same thing. For the sake of this article (and how I talk about these in general) I will use the following:

MCU: Microcontroller – Processor + Storage + Peripheral’s* + Power Management.

MPU: Microprocessor – Simply the Processor.

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

*Some peripherals will still require external PHY’s/hardware (ethernet)

Some common examples of Microcontrollers and Microprocessors:

MCU’s:

  • Microchip ATMEGA328 (Arduino).
  • STMicro STM32 (Not like you can buy them).
  • Espressif ESP32.

MPU’s:

  • BCM28xx/BCM2711 (Raspberry Pi).
  • AM335x (Beagle Bone).
  • Jetson Nano (Tegra K1).
  • Computer CPU’s.

Commonly discussed advantages of an MPU are that they have more processing power and more memory. While an MCU is cheaper and easier to develop for. While these are true for the most part, they don’t tell the whole story when comparing a microprocessor vs a microcontroller.

 

Real World Example

To give a more concrete example of how to compare a microprocessor vs a microcontroller I will give a real-world example that we encountered on a job we did a proposal for.

It was an audio mixer that took in several audio channels. It would mix and apply filters to the streams, then output a single stream of audio.

We came up with two very different solutions:

MCU based approach: Uses a mixture of analog components and digital IC’s. The MCU controls the analog blocks and the IC’s.

MPU based approach: All audio is directly fed into the MPU, which handles all mixing and filtering. The audio stream is then output from the MPU.

While both of these approaches would work, there are some pretty massive differences between them.

Microprocessor Solution

  • Incredibly flexible.
  • Less external audio hardware.
  • Due to the above, it could end up being cheaper.
  • Easy to implement software using existing libraries.

Microcontroller Solution

  • Limited flexibility.
  • Requires a lot of analog and digital hardware.
  • Real-time audio, minimal latency.

Our Answer

While we ended up not actually working on this design, the solution we proposed was based around a Microcontroller. One of the client’s main criteria was that the audio needed to be passed through with minimal latency. That alone made the MPU solution tough to pull off.

 

Microprocessor vs Microcontroller Operating Systems

One of the key differences between a microprocessor and a microcontroller is the existence of an operating system. A microcontroller tends to run bare metal code or uses a Real Time Operating System (RTOS). A microprocessor will normally run a true operating system, typically some flavor of Linux.

Having Linux on an embedded system allows you to easily do in software what would be nearly impossible using a bare-metal approach.

Note: MCU’s can technically run a true operating system, but it is not commonly done, and I will not discuss that use case.

 

Why is Designing with Microprocessors Difficult?

Nearly every comparison chart discussing a Microcontroller vs a microprocessor mentions that designing with a MPU is more difficult. On the hardware side it is hard to disagree with that.

First, the majority of MPU’s use BGA packages. Often, quite fine pitch, high pin count BGA’s! An experienced electronics design shop certainly won’t have any issues with this, but it is something to keep in mind.

Also, MPU’s require external flash and RAM (some will have a bit of onboard flash, but you will still need additional for most applications.) While having more RAM/Flash is one of the common reasons to use a MPU in the first place, it increases hardware complexity. DDRx memory is also a high-speed interface that requires higher layer count PCB’s and controlled impedances.

Finally, getting Linux up and running can be an awful experience. It is nearly 100% dependent on vendor support. Common Linux distributions are Ubuntu/Debian, Yocto, and BuildRoot.

 

Dealing with Real-Time Requirements

Often, the single differentiating factor when deciding between a microcontroller and a microprocessor is the real-time response. Due to the operating system, MPU’s are inherently not real-time systems. For some applications this is not an issue, for others this is a complete deal breaker.

If you need real-time response and also to run Linux, there are a few solutions:

First, you can have an MPU as the controller for the system. It will then talk to an external MCU over SPI/UART/i2c/etc. The MCU would handle the time critical functions, while the MPU handles everything else. This is a very commonly used solution in industry.

Second, some more modern microprocessors are embedding a secondary co-processor onboard. The STM32MP1 is an example of an MPU that has one. This co-processor can be used to offload code that needs to be able to run real-time.

How Do I Choose?

To boil down this topic even further, I will discuss how we evaluate a new design. Normally, the default option is to just use a microcontroller. The majority of applications that we encounter, it makes the most sense.

If the project is:

  • Computationally heavy
    • Computer vision.
    • Machine learning.
    • Anything with a lot of math calculations.
    • Onboard graphics engine.
  • Memory intensive
    • Driving displays.
    • Large LED arrays.
  • Requiring specific interfaces
    • High-speed USB.
    • HDMI.
    • Ethernet.

Then we will consider using a microprocessor instead of a microcontroller.

From there, if we think the application requires a true operating system to give the best solution, we will lean towards using a microprocessor. If there is an interface that must be real-time, then we normally will add additional microcontrollers to the design to handle that aspect.

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

Conclusion

There are a lot of articles out there discussing microcontrollers vs microprocessors. Instead of taking an approach of just compare/contrasting pros/cons I used more concrete, real-world examples. While there are certainly applications that require a microcontroller or a microprocessor specifically, normally both will work. It is a matter of deciding which approach makes more sense both in BOM cost and design time.

MicroType Engineering has years of experience designing both microcontroller and microprocessor based systems. With full firmware support, MTE can assist with any and all parts of the design process. Reach out to learn how MTE can 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) as well as Single Board Computer (SBC). But do you know, they’re actually very different yet similar in a way! Confused? No fret! Today, we will examine each of their differences and uses in our day-to-day life!

Before we hop right into each of them, let’s talk briefly about CPU, since this is where all the processors begin!

What is the CPU?

Old CPU
Ref: pcworld

To put simply, CPU is the core component in a computing unit, which is 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 understand more about CPU, lets’ look at Microprocessor (MPU), Microcontroller (MCU) and Single Board Computer (SBC) in detail!

What is a Microprocessor (MPU)?

The Microprocessor (MPU) is also known as Micro Processing Unit, it is the central unit of a computer system that performs arithmetic and logic operations. It also incorporates the function of a CPU on an integrated circuit.

How does MPU work?

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

To understand how it works better, you can refer to a basic block diagram below:

Ref: Javapoint

As you can see, a microprocessor consists of an ALU, control unit and register array, 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 the instructions and flow of data within the computer
  • Register array: includes registers identified by letters and accumulator
  • Memory Unit: Stores data

Basic Terms to note

  • Bus: Describe the set of conductors that transmit data or that address or control information to the microprocessor’s different elements. (MPU usually has 3 types: data bus, the address bus, and control bus.)
  • Clock Speed: Normally measured in Hertz and expressed in measurements like MHz (megahertz) and GHz (gigahertz), refers to the speed at which a microprocessor could execute instructions.
  • Instruction Set: A series of commands that a microprocessor can understand, basically 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 one time.
  • Cache Memory: It stores data or instructions that the software or program frequently references during operation, increases overall speed as it allows the processor to access data more quickly.

Categories of MPU

Reduced Instruction Set Computer (RISC)

  • Generally utilised
  • Fewer instructions
  • Simpler circuits
  • Operates faster
  • More registers
  • Uses more RAM
  • Uses a fixed number of clock cycles

Complex Instruction Set Computer (CISC)

  • The direct opposite of RISC
  • Reduce the number of instructions
  • Complex instructions
  • Operates slower
  • Uses little RAM
  • Fewer registers
  • Numerous clock cycles

Popular MPUs

  • Intel
  • AMD

Applications of MPU

  • Automobile
  • Credit card processing unit
  • Security systems
  • Household devices

What is a Microcontroller (MCU)?

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

How does MCU work?

They basically take inputs from the device they controlling and retain control by sending the device signals to different parts of the device, usually run on one specific program and are dedicated to a single task. Thus, they’re comparably weaker than MPU.

Similarly, here’s a block diagram of MCU to help you understand better:

As you can see, a microcontroller typically consists of CPU, Memory (RAM and ROM), Timer, I/O port, Serial Ports, Interrupt control:

  • CPU: Brain of the MCU, responsible for fetching the instruction, decodes it, then execute it.
  • Memory: Similar to how it functions in MPU, used to store data and program. But in MCU, there are RAM and ROM or flash memories for storing program source codes.
  • Timer: Provides all timing and counting functions inside the microcontroller. It is used to perform clock functions, modulations etc.
  • I/O port: It allows you to drive/interface various devices such as LCD’S, LED’S, printers, memories, etc to a microcontroller.
  • Serial Ports: Provides various serial interfaces between a microcontroller and other peripherals like parallel ports.
  • Interrupt control: Provides interrupt (delay) for a working program, it could occur internally or externally.

Types of MCUs

  • 8-bit: The most cost-effective and commonly used by many
  • 16-bit
  • 32-bit

Popular MCUs

  • ATMega328
  • ESP32

Applications of MCU

  • Communication systems
  • Robotics field
  • The peripheral controller in PC
  • Biomedical instruments
  • IoT

What is a Single Board Computer (SBC)?

Single Board Computers are small computing devices that have all of the elements of a complete computer contained within one single circuit board. It is a low cost, self-contained, simple that could be easily connected to other hardware.

How does SBC work?

SBCs uses a System-on-Chip (SoC), which integrates all or most components of a computer or other electronic system. It works exactly like how an MPU does but even more, such as signal processing, wireless communication, artificial intelligence etc., on top of transmitting data.

Just like the block diagram shown in the previous 2 sections, here’s an SBC block diagram to help you visualize better:

As you can tell from the block diagram, an SBC looks like a combination of both MPU and MCU but with a lot more functions:

  • CPU/SoC: Brain of the SBC, responsible for fetching the instruction, decodes it, then execute it.
  • Memory: Similar to how it functions in MPU and MCU, used to store data and program. However, unlike the previous 2, there are RAM and ROM or flash memories for storing program source codes.
  • Clock/Timer: Provides all timing and counting functions inside the microcontroller. It is used to perform clock functions, modulations etc.
  • I/O port: It allows you to drive/interface various devices such as LCD’S, LED’S, printers, memories, etc to a microcontroller.
  • Serial Ports: Provides various serial interfaces between a microcontroller and other peripherals like parallel ports.
  • ADC/DAC: Analog to Digital Converter (ADC), which converts the analog signal into the digital signal. Digital to Analog Converter (DAC) and it converts the Digital signal into an analog signal.
  • Wireless Connectivity: Consists of Bluetooth and WiFi

Popular SBCs:

  • Raspberry Pi
  • NVIDIA
  • Rock Pi

Applications of SBCs

  • Programming
  • Embedded Applications
  • Backplane
  • Robotics
  • Home automation

Comparison between Microprocessor, Microcontroller and Single Board Computer

Microprocessor (MPU)Microcontroller (MCU)Single Board Computer (SBC)The heart of a computer systemThe heart of an embedded systemMicrocomputerMemory and I/O components has to be connected externallyHas an external component with an internal memory and I/O componentsHas an external component with an internal memory and I/O componentsUnable to use in compact systemsAble to use in compact systemAble to use in compact systemCost of the system is higherCost of the system is lowerCost of the system is lower Since memory and I/O components are external,
each instruction goes through the external operation. Thus it’s slower.Components are internal, where the operation takes place internally, thus it’s fasterComponents are internal, where the operation takes place internally, thus it’s fasterWidely used in PC and laptops, big control systemsWidely used in small control systemsWidely used in programming and small control systems

Summary

And that’s all on Microprocessor (MPU), Microcontroller (MCU) as well as Single Board Computer (SBC)! Did you learn something new? Able to differentiate them now? Hope that this article could help you choose the right processors for your projects.

If this article is up to your alley, check out the related readings to learn more!

Suggested Readings

Raspberry Pi Related

Overview of Computer Ports: Types, Functions and Comparison – Learn about SBC ports and Raspberry Pi’s background!

Analog-to Digital Converter (ADC): Reading Raspberry Pi Analog – Interested to use ADC with Raspberry Pi? Check out this article to find out!

New Raspberry Pi Compute Module 4 (CM4) released from $25 and up – Learn more about the newest Raspberry Pi Compute Module 4!

Raspberry Pi Alternatives: 16 Best Single Board Computers in 2020 – Interested in getting an SBC that isn’t Raspberry Pi? Check out this article for recommendations!

Arduino Related

How does Arduino work with Ultrasonic Sensor? – Learn about what interesting projects you can do using Arduino and ultrasonic sensor!

Best Arduino Boards and Microcontrollers (MCUs) for IoT and Wearables – Interested in getting an Arduino or MCU? Check out this article to help you with that!

If you want to learn more, please visit our website rk3588s board.

About Author

Continue Reading

73

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