What's the difference between microcontrollers and microprocessors?
It can be difficult to choose the right system for your new concept.
The need to strike the right balance between price, efficiency, and power consumption has a lot of ramifications.
First and foremost, there are the immediate technological requirements for the preparation you should begin. However, if a platform solution relies on a microcontroller (MCU) or a microprocessor (MPU), the decision can have long-term consequences.
The distinction between a microprocessor and a microcontroller has become a point of contention.
First comparison
Typically, an MCU stores and executes the software in on-chip embedded nonvolatile storage.
By storing the program in this way, the MCU can start up faster and execute code more efficiently.
The only practical drawback to using embedded memory is that the total amount of memory available is limited. The program memory on most Flash MCUs on the market is limited to eight megabytes. Depending on the application, this may be a limiting factor.
Memory limits do not apply to MPUs in the same way as they do to MCUs. They run programs and data storage using external memory.
Non-volatile memory, such as NAND or serial Flash, is often used to store the program. This can be loaded into an external DRAM at startup, and execution can begin.
This means the MPU won't boot up as fast as an MCU, but the amount of DRAM and NVM you'll be able to connect to the processor will be in the hundreds of Mbytes for DRAM and thousands of Gbytes for NAND.
Technical differences
In contrast to microcontrollers, microprocessors have a lot of processing power.
Microprocessor clock speeds usually exceed 1GHz, although microcontroller clock speeds vary from 20MHz to 400MHz.
Since a microcontroller is designed for a particular purpose, it only requires the hardware needed for that application.
For example, applications like the washer and air conditioner only need a small amount of RAM, ROM, and processing power.
As a result, when compared to a microprocessor, the microcontroller has less processing capacity.
Microprocessors are used for a variety of tasks ranging from data analysis to high-end tasks such as server processing. As a result, it's referred to as a general-purpose unit.
Consequently, it should have higher processing power. And it's also scalable since the peripherals like RAM, ROM etc. are connected externally.
Another distinction is power.
An MCU only needs one single voltage power rail since it has its own power supply.
An MPU, on the other hand, needs many different voltage rails for the cores, DDR, and other components.
The designer must account for this with on-board control ICs and converters.
Microprocessor-based devices often use more power because they have more computing power and a lot of power-hungry peripherals attached externally.
Though microcontroller-based systems use less power and can also be used in battery-powered applications, they have a long battery life. Furthermore, an MCU's current consumption is orders of magnitude lower than that of an MPU. You may consider an aspect 10 to 100 in low power mode, for example, with SRAM and register retention.
This is directly related to the amount of RAM and processing power needed by a program to restart service immediately.
The options for choosing between an MCU or MPU-based approach are numerous, and they include efficiency, capability, and therefore the BOM budget.
The required processing efficiency that any particular specification can need is a difficult attribute to see. In general it can be quantified using processing speed, which is calculated in Dhrystone MIPS (DMIPS).
A microcontroller based on the ARM Cortex-M4 architecture, such as Atmel's SAM4 MCU, is rated at 150 DMIPS. The SAMA5D3 from Atmel is an ARM Cortex-A5 application processor (MPU) that can produce up to 850 DMIPS. Observing the appliance's performance-hungry parts is one way to estimate the DMIPS required.
A minimum of 300–400 DMIPS is needed to run a complete software system (OS) for your program, such as Linux, Android, or Windows CE. For a number of applications, a simple RTOS with a DMIPS allocation of fifty will be appropriate.
Using an RTOS also has the advantage of requiring little memory; a kernel of a few kB is common. Unfortunately, a full OS demands a memory management unit (MMU) so as to run; this successively specifies the kind of processor core to be used and need more processor capability.
Applications point of view
The microprocessor is used in applications where tasks are not predefined.
It's used in laptops, cell phones, video games, televisions, and other devices where the mission isn't predetermined and is dependent on the consumer. When intensive processing is needed, the microprocessor is typically used.
The closest example of a microprocessor in action is a laptop. The laptop is used for a variety of tasks, including video downloading, emulation, image processing, web searching, gaming, paper creation, and more.
On the other hand the microcontroller is designed for a specific purpose, and once the software is embedded on the MCU chip, it cannot be readily changed, necessitating the use of special equipment to reburn it.
As a consequence, it performs some computation, supports the microcontroller's input, and then outputs the predetermined performance. Inputs may be provided by the user or from sensors the microcontroller is connected with.
Many electronic appliances use it, like the washer, microwave, and timer.
The application is predefined in these devices; however, it will require some user input to administer the predefined performance.
Let's assume the user sets the input parameters for the washer, and the washer then washes the clothes according to those parameters. As a result, the washer's most important job (washing clothes) is complete.
Costs
Microprocessors are used in high-end systems such as computers, cell phones, and so on to perform complex calculations. They also have more I/O pins than microcontrollers, allowing them to connect more RAM, ROM, and other I/O devices.
As a result, they are typically more expensive than microcontrollers.
However, this isn't always the case, and you will find microcontrollers with high-end processors that cost more than a microprocessor.
Conclusion
MCUs are commonly used in cost-effective solutions that require strict BOM regulation and power saving. MCUs are increasingly used in ultra-low-power applications such as remote controls, consumer electronics, and smart meters, where the emphasis is on battery life and little to no user interaction. They're often used when a high level of determinism is foreseen.
Larger numbers of MPUs are used in applications with a lot of functionality and high performance. MPUs are suitable for industrial and consumer applications that use an operating system. These may be computationally intensive, requiring several high-speed connections or an expensive user interface.