Wednesday, June 7, 2023

Difference Between Microprocessor and Microcontroller

- Advertisement -
 

Selecting the right device on which to base your new design can be daunting. The need to make the right balance of price, performance, and power consumption has many implications. However, if a microcontroller (MCU) or microprocessor (MPU), becomes the basis of a platform approach, the decision can have long-lasting consequences.

First, there will be immediate technology considerations for the design you are able to embark on.

The difference between microprocessors and microcontrollers becomes a critical debate at this point.

Microcontroller Internal Parts
Microcontroller

Microcontroller vs Microprocessor: Primary Differences

- Advertisement -

Typically an MCU uses on-chip embedded Flash memory in which to store and execute its program. Storing the program this way means the MCU has a shorter start-up period and executes code quickly. The only practical limitation to using embedded memory is that the total available memory space is finite.

Most Flash MCU devices available on the market have a maximum of 2 Mbytes of Program memory. This may prove to be a limiting factor, depending on the application.

MPUs do not have memory constraints in the same way. They use external memory to provide program and data storage. The program is typically stored in non-volatile memory, such as NAND or serial Flash.

At start-up, this is loaded into an external DRAM and execution commences. This means the MPU will not be up and running as quickly as an MCU but the amount of DRAM and NVM you can connect to the processor is in the range of hundreds of Mbytes and even Gbytes for NAND.

Another difference is power. By embedding its own power supply, an MCU needs just one single-voltage power rail. By comparison, an MPU requires several different voltage rails for the core, DDR, etc. The developer needs to cater to this with additional power ICs / converters on board.

Difference Between Microprocessor and Microcontroller: Application Perspective

From the application perspective, some aspects of the design specification might drive device selection in particular ways. For example, is the number of peripheral interface channels required more than can be catered for by an MCU? Or, does the marketing specification stipulate a user interface capability that will not be possible with an MCU because it does not contain enough memory on-chip or has the required performance?

When embarking on the first design and know that it is highly likely there will be many product variations. In that case, it is very possible a platform-based design approach will be preferred. This would stipulate more “headroom” in terms of processing power and interface capabilities in order to accommodate future feature upgrades.

Some Measurement Parameters…

An attribute that is difficult to determine is the required processing performance any given design might require. Processing power, measured in terms of Dhrystone MIPS (DMIPS), helps quantify these criteria.

The table below explains the microcontroller and microprocessor difference.

Microcontroller Microprocessor
Microcontroller Block Diagram Microprocessor Block Diagram
  • The microcontroller is the heart of an embedded system.
  • The microprocessor is the heart of a Computer system.
  • The microcontroller has an external processor along with internal memory and i/O components
  • It is just a processor. Memory and I/O components have to be connected externally
  • Since memory and I/0 are present internally, the circuit is small.
  • Since memory and I/O have to be connected externally, the circuit becomes large.
  • Can be used in compact systems and hence it is an efficient technique
  • Cannot be used in compact systems and hence inefficient
  • The cost of the entire system is low
  • Cost of the entire system increases
  • Since external components are low, total power consumption is less and can be used with devices running on stored power like batteries.
  • Due to external components, the entire power consumption is high. Hence it is not suitable to use with devices running on stored power like batteries.
  • Most microcontrollers have power-saving modes like idle mode and power-saving mode. This helps to reduce power consumption even further.
  • Most microprocessors do not have power-saving features.
  • Since components are internal, most of the operations are internal instruction, hence speed is fast.
  • Since memory and I/O components are all external, each instruction will need an external operation, hence it is relatively slower.
  • Microcontrollers have more registers, hence the programs are easier to write.
  • Microprocessors have less number of registers, hence more operations are memory based
  • Microcontrollers are based on Harvard architecture where program memory and Data memory are separate
  • Microprocessors are based on the von Neumann model/architecture where programs and data are stored in the same memory module
  • Used mainly in washing machines, MP3 players
  • Mainly used in personal computers


For example, an ARM Cortex-M4-based microcontroller such as Atmel’s SAM4 MCU is rated at 150 DMIPS. Whereas an ARM Cortex-A5 application processor (MPU) such as Atmel’s SAMA5D3 can deliver up to 850 DMIPS. One way of estimating the DMIPS required is by looking at the performance-hungry parts of the application.

Running a full operating system (OS), such as Linux, Android, or Windows CE for your application would demand at least 300–400 DMIPS.

For many applications, a straightforward RTOS might suffice and an allowance of 50 DMIPS would be more than adequate. Using an RTOS also has the benefit that it requires little memory space; a kernel of just a few kB is typical.

Unfortunately, a full OS demands a memory management unit (MMU) in order to run; this, in turn, specifies the type of processor core to be used and requires more processor capability.

Difference Between Microprocessor and Microcontroller: Applications

For running applications that are more number-crunching intensive enough, DMIPS allowance needs to be reserved on top of any OS and other communication and control tasks. The more numeric-based the application, the more likely an MPU is required.

The user interface (UI) can be a serious consideration irrespective of the aim of the application. As consumers, we have become familiar and comfortable with using colorful and intuitive graphical UI.

Industrial applications are increasingly using this method of operator interaction. The operating environment, however, can limit the usage of this one. For the UI there are a number of factors.

Why are the Differences Necessary?

Firstly, is the processing overhead required? An overhead of 80–100 DMIPS might suffice for a UI library such as Qt since it is widely used on top of Linux. The second factor is to do with the complexity of the UI. Higher processing power and memory are needed for more animations, effects, multimedia content, and more changes applied to the image to be displayed. And these requirements scale up with the resolution, which is why for applications designed to be UI-centric an MPU is more likely to suit.

On the other hand, a simpler UI with pseudo-static images on a lower-resolution screen can be addressed by an MCU. Another argument in favor of the MPU is that it generally comes equipped with an embedded TFT LCD controller. Very few MCUs have this capability. The TFT LCD controller and some other external driver components have to be added externally. So, while possible to achieve with an MCU, the developer needs to look at the overall BOM.

Sampling a Microcontroller

Some Flash MCUs are now coming onto the market with TFT LCD controllers embedded. There must however still be enough embedded SRAM memory available to drive the display. For example, the QVGA 320 x 240 16-color format requires 150 kB of SRAM to feed and refresh the display.

This is a fairly high amount of SRAM to dedicate. Some extra memory might be required, which would further add to the BOM and bridge the gap with the MPU solution. More complex and advanced graphical UIs, especially using screens larger than 4.3” inches, would stipulate an MPU.

If MPUs are seen to dominate when it comes to running a UI on a color TFT screen then MCUs are the kings for segment or dot matrix LCD control and other screens with serial interfaces.

Difference Between Microprocessor and Microcontroller: Connectivity Standpoint

From the connectivity standpoint, most MCU and MPU devices are available, with all the common popular peripheral interfaces. High-speed communication peripherals such as HS USB 2.0, multiple 10/100 Ethernet ports, or Gigabit Ethernet ports are generally only found on MPU. They are better capable to handle and process large amounts of data. Whether there are enough suitable channels and bandwidth to handle the data traffic is a key question.

Depending on the communication protocols used, the impact on code space using third-party stacks should be checked. Applications demanding high-speed connectivity, especially in combination with using OS-based stacks will require an MPU-based design.

Another key aspect driving the difference between microprocessor and microcontroller selection is the need for a real-time/deterministic behavior of the application. Because of the processor core used in an MCU, as well as the embedded flash and considering the software used that is either an RTOS or bare metal C, the MCU will definitely take the lead on this aspect and will address perfectly the most time-critical and deterministic applications.

Difference Between Microprocessor and Microcontroller: Power Consumption

A final point to consider is power consumption. While MPUs have low power modes there are not as many or as low as the ones you would find on a typical MCU. With the external hardware supporting an MPU as an added factor, putting an MPU into a low-power mode might also be slightly more complex.

Also, the actual consumption of an MCU is magnitudes lower than an MPU. In low power mode for example, with SRAM and register retention, you can consider a factor of 10 to 100. This is directly related to the amount of RAM and power required by an operating system to resume operation instantaneously.

The decisions involved in selecting either an MCU or MPU-based approach are many and involve performance, capability, and the BOM budget.

Selecting One?

Broadly speaking, MCUs tend to be used in cost-optimized solutions which require tight control of BOM and power saving. Functionally rich and high-performance applications employ a scale, larger number of MPUs. Ultra-low power applications such as remote controls, consumer electronics, and smart meters where the design emphasizes the longevity of battery life and no or little UI interaction find larger use of MCUs.

They are also used where highly deterministic behavior is needed. MPUs are ideal for OS-based industrial and consumer applications. These might be computed intensively and require multiple high-speed connectivities or a rich UI.

Selecting a vendor offering highly compatible MCU and MPU products where you can easily migrate up and down and maximize software reuse provides the best return on investment over time.

Computer Motherboard History
The history of computer motherboards (Courtesy: http://www.atmel.com/images/mcu_vs_mpu_article.pdf)

One of the most popular Microcontrollers is the 8051 microcontroller.

12 COMMENTS

SHARE YOUR THOUGHTS & COMMENTS

 
 

What's New @ Electronicsforu.com?

Truly Innovative Tech

MOst Popular Videos

Electronics Components

Tech Contests