Selecting Between a Microcontroller and Microprocessor

embedded

ByOdunlade Emmanuel 0

Selecting between a Microcontroller and Microprocessor

The brain of an embedded device, which is the processing unit, is a key determinant of the success or failure of the device in accomplishing the task(s) for which it is designed. The processing unit is responsible for every process involving from input to the system, to the final output, thus selecting the right platform for the brain becomes very important during the device design as every other thing will depend on the accuracy of that decision.

 

Microcontroller and Microprocessor

The processing components used for embedded devices can be divided into two broad categories; Microcontrollers and Microprocessors.

Microcontrollers are small computing devices on a single chip that contain one or more processing cores, with memory devices embedded alongside programmable special and general purpose input and output (I/O) ports. They are used especially in applications where only specific repetitive tasks need to be performed. We already discussed about selecting the Right Microcontroller for your embedded projects.

Microprocessors on the other hand are general purpose computing devices which incorporate all the functions of the central processing unit on a chip but do not include peripherals like memory and input and output pins like the microcontroller.

Microprocessor

 

Although manufacturers are now changing a lot of things that are blurring the line between microcontrollers and microprocessors like the use of memory on chips for microprocessors and the ability of microcontrollers to connect to an external memory, key differences still exist between these components and the designer will need to choose the best between them for a particular project.

Learn more about the difference between Microcontroller and Microprocessor.

 

Factors to Consider when Selecting a MPU or MCU

Before making any decision on the direction to go as regards the processing device to use for the design of an embedded product, it is important to develop the design specifications. Developing the design specifications provide an avenue for device pre-design which helps identify in details, the problem to be solved, how it is to be solved, highlights the components to be used and much more. This helps the designer make informed general decisions about the project and helps determine which direction to travel for the processing unit.

Some of the factors in the design specification that needs to be considered before choosing between a microcontroller and a microprocessor are described below.

 

1. Processing Power

Processing power is one of the main (if not the main) things to consider when selecting between a microcontroller and a microprocessor. It’s one of the main factors that tilt use to microprocessors. It is measured in DMIPS (Dhrystone Million of Instructions Per Seconds) and represents the number of instructions a microcontroller or microprocessor can process in a second. It is essentially an indication of how fast a device can complete a task assigned to it.

Processing Power

 

While determining the exact computational power your design requires can be a very difficult task, an educated guess can be made, by examining the task(s), the device is being created to perform and what the computational requirements of those tasks might be.  For instance the development of a device that requires the use of a full operating system either embedded Linux, windows CE or any of the other OS would require a processing power as high as 500 DMIPS, sounding like a processor? Yes. To add to it, running an operating system on a device will require a memory management unit (MMU) which will increase the required processing power. Device applications that involve a lot of arithmetic also require very high DMIPS values and the more the maths/numeric computations the device is to perform, the more the design requirements tilt towards the use of a microprocessor due to the processing power required.

One other main implication of processing power that affects the choice between microprocessors and microcontrollers is the complexity or simplicity of things like User interfaces. It is a desirable thing these days to have colourful and interactive GUIs even for the most basic of applications. Most libraries used in creating user interfaces like QT require processing power as much as 80 – 100 DMIPS and the more animations, images and other multimedia contents to be displayed, the more the required processing power. However, simpler user interfaces on low resolution screens require little processing power and can be powered using microcontrollers as quite a number of them these days, come with embedded interfaces to interact with different displays

Asides some of the core functions mentioned above, it is important to reserve some processing power for communications and other peripherals. Although most examples given above tend to support the use of a microprocessors, they are generally more expensive compared to microcontrollers and will be an overkill when used in certain solutions, for example using a 500 DMIPS microprocessor to automate a light bulb will make the overall cost of the product higher than normal and could ultimately lead to its failure in market.

 

2. Interfaces

The interface to be used to connect different elements of the product is one of the factors to be considered before choosing between a microcontroller and a microprocessor. It is important to ensure the processing unit to be used has the interfaces required by the other components.

From connectivity and communications stand point for instance, Most microcontrollers and Microprocessors possess the interfaces required to connect to communication devices but when high speed communication peripherals like the super speed USB 3.0 interface, multiple 10/100 Ethernet ports or Gigabit Ethernet port are required, things tilt in the direction of the Microprocessor as the interface required to support these are generally only found on them because they are more capable of handling and processing the large amounts of data and the speed at which those data are transferred.

The Impact of the protocols used for these interfaces on the amount of memory required for the firmware should be confirmed as they tend to increase memory requirements. It’s a general rule of thumb that a microprocessor-based design, be adopted for applications that require high-speed connectivity with large amount of data being exchanged especially when the system involves the use of an operating system.

 

3. Memory

These two data processing devices handle memory and data storage differently. Microcontrollers for instance come with embedded, fixed memory devices while microprocessors come with interfaces to which memory devices can be connected. Two major implications of this are;

 

Cost

The microcontroller becomes a cheaper solution, since it does not require the use of an additional memory device while the microprocessor becomes an expensive solution to be adopted due to these additional requirements.

 

Limited Memory

The fixed memory on the microcontroller makes the amount of data which can be stored on it limited. This is a situation not applicable to processors since they are usually connected to external memory devices. A good example of when this limitation can be a problem is when developing firmware for the device. Adding Additional kilobytes to the code size may require a change in the microcontroller to be used but if the design were based on a processor, we will only need to change the memory device. Thus Microprocessors offer more flexibility with memory.

There are several other factors based on the memory to be considered, one of them is the start-up (boot) time. The Microprocessors for instance stores the firmware on an external memory (Usually an external NAND or Serial Flash memory) and on boot, the firmware is loaded into the DRAM of the processor.  While this takes place within a couple of seconds, it might not be Ideal for certain applications. The microcontroller on the other takes less time.

Memory Devices

 

For general speed considerations, the MCU usually wins due to its ability to address the most time critical applications because of the processor core used in them, the fact that the memory is embedded and the firmware used with them is always either an RTOS or bare metal C.

 

4. Power

A final point to consider is power consumption. While Microprocessors have low power modes, these modes are not as many as the ones available on a typical MCU and with the external components required by a microprocessor based design, it is slightly more complex to achieve low power modes. Asides from the low power modes, the actual amount of power consumed by an MCU is a whole lot lower than what a microprocessor consumes, because the larger the processing capability, the more the amount of power required to keep the processor up and running.

Microcontrollers therefore tend to find applications where ultra-low power processing units are required such as remote controls, consumer electronics and several smart devices where the design emphasis is on the longevity of battery life. They are also used where a highly deterministic behaviour is needed.

Microprocessors on the other hand are ideal for industrial and consumer applications that require an operating system, are computation intensive and require high-speed connectivity or a user interface with lots of media information.

 

Conclusion

Several other factors exists and serve as determinants for choosing between these two platforms and all fall under performance, capability and budget but the overall selection becomes easier when a proper systems pre-design is in place and the requirements clearly stated. Microcontrollers are mostly used in solutions with a very tight BOM budget and with stringent power requirements while, Microprocessors are used in applications with huge computation and performance requirements.

Get Our Weekly Newsletter!

Subscribe below to receive most popular news, articles and DIY projects from Circuit Digest

Comments

Log in or register to post Comment