Difference between microcontroller and microprocessor. About microcontrollers for beginners - history of creation, main types and differences Plis architecture

Altera-Cyclone and Arduino

Essence of the question. Difference between FPGA and microcontroller

Each novice microproger at a certain stage of his development asks the question of what difference between FPGA(from Altera or Xilinx) and microcontroller(microprocessor)?

You read the forums - experts write that these are completely different things that cannot be compared, arguing that they have different architecture... You read a manual on Verilog or C ++ - both of them use similar operators with similar functionality, even the syntax is similar, but why are they different? You go to the rover - there with LEDs (or even just bulbs) using FPGA blink, you look at projects on Arduino - they control robots there. Stop!

But now let's stop and ask ourselves: why with FPGA- stupid light bulb, and Arduino - smart robot? After all, both the first and the second seem to be a programmable device, really have FPGA Opportunities for the Robot Not Enough?

To some extent, the essence of the question “What difference between FPGA and microcontroller? " is revealed by just such an example.

Let's note right away. Functional FPGA initially not inferior microcontroller(and the microprocessor, by the way, too), more precisely - the main functions of one and the second are essentially identical - to issue logical 0 or 1 under certain conditions, and if we talk about speed, the number of pins (legs) and the possibilities of pipelining, then microcontroller before FPGA but generally far away. But there is one "but". Time to develop the same software algorithm on two different devices (FPGA and microcontroller) differs several times, or even tens of times. Exactly FPGA here in 99% of cases it is strongly inferior to MK. And it's not at all about the confusion of languages Verilog,VHDL or AHDL, and in the device itself FPGA.

On the interaction of the programming language with the architecture of the FPGA and the microcontroller

FPGA: v FPGA and there are no complex automated chains (doing some of the work for you). There are only iron wire routes and highways, inputs, outputs, logic blocks and memory blocks. Among the traces there is a special class - a clock trace (tied to certain pins through which it is recommended to pass the clock frequency).

Main cast:

Track - metal soldered to the layers of the microcircuit is a conductor of electricity between the blocks.

Blocks are individual locations on a board that are made up of cells. Blocks are used for storing information, multiplication, addition and logical operations on signals in general.

Cells are groups from several units to several tens of transistors.

The transistor is the main element of TTL logic.

Conclusions (microcircuit legs) - through them the exchange takes place FPGA with the outside world. There are special-purpose legs designed for firmware, clock frequency reception, power supply, as well as legs, the purpose of which is set by the user in the program. And there are, as a rule, much more of them than microcontroller.

Clock generator - an external microcircuit that generates the clock pulses on which most of the work is based FPGA.

FPGA architecture. Interrelation of constituent elements

Traces are connected to blocks using special CMOS transistors. These transistors are able to maintain their state (on or off) for a long period of time. The state of the transistor changes when a signal is applied along a certain route, which is used only when FPGA programming... That is, at the time of the firmware, it is the voltage supply to a certain set of CMOS transistors that is carried out. This set is determined by the firmware program. Thus, a complex construction of a huge network of highways and highways occurs inside FPGA connecting a huge number of logical blocks in a complex way. In the program, you describe what kind of algorithm you need to perform, and the firmware connects the elements that perform the functions that you describe in the program. Signals run along the track from block to block. A complex route is set by the program.


FPGA architecture(FPGA)

Microcontroller architecture

In this element of TTL logic, all operations for processing individual signallers are carried out independently of you. You only indicate what to do with this or that set of received signals and where to send those signals that need to be transmitted. Architecture microcontroller consists of completely different blocks than FPGA... And the connections between the blocks are carried out via permanent highways (and not reflash). Among the MK blocks, the main ones can be distinguished:

Read-only memory (ROM) is the memory that stores your program. It includes algorithms of actions and constants. As well as libraries (sets) of commands and algorithms.

Random access memory (RAM) - memory used by microcontroller for temporary storage of data (like triggers in FPGA). For example, when calculating in several steps. Let's say you need to multiply the first number that came in by the second (1st action), then the third by the fourth (2nd action) and add the result (3rd action). In this case, the result of 1 action will be entered into the RAM for the duration of the second, then the result of 2 actions will be entered. And then both of these results will go from the RAM to the calculation of 3 actions.

The processor is a calculator microcontroller... He communicates with RAM, as well as with permanent memory. Computations are exchanged with the operational one. From the constant, the processor receives instructions that make the processor execute certain algorithms and actions with signals at the inputs.

I / O Means (Ports) and Serial I / O Ports - Legs microcontroller designed to interact with the outside world.

Timers are blocks designed to count the number of cycles during the execution of algorithms.

Bus controller - a unit that controls the exchange between all units in microcontroller... It processes requests, sends control commands, organizes and organizes communication inside the crystal.

Interrupt controller - a block that receives interrupt requests from external devices. An interrupt request is a signal from an external device informing that it needs to exchange any information with microcontroller.

Internal highways - routes laid inside microcontroller for information exchange between blocks.

A clock generator is an external microcircuit that generates the clock pulses on which all microcontroller operation.

The relationship of the constituent blocks of the microcontroller

V microcontroller, v differences from FPGA, the work takes place between the above blocks, which have a complex architecture that facilitates the process of developing programs. When flashing, you only change the permanent memory on which all the work of the MK is based.


The main difference between FPGA and microcontroller

The FPGA is stitched at the iron level, practically over the entire area of ​​the crystal. The signals travel through complex chains of transistors. The microprocessor is flashed at the program level for hardware, signals pass in groups, from block to block - from memory to processor, to RAM, from RAM to processor, from processor to I / O ports, from I / O ports to RAM, from RAM ... and so on. Conclusion: due FPGA architecture wins in speed and wider possibilities of pipeline processing, MK wins in the ease of writing algorithms. Due to the simpler way of describing programs, the developer's imagination Microcontroller less constrained by time for debugging and development, and, thus, time for programming the same robot on MK and FPGA will differ many, many times. However, a robot working on FPGA will be much faster, more accurate and nimble.

Hardware and software.

V FPGA all the work must be done by yourself, manually: in order to implement any program on FPGA, you need to track each signal for each wiring that comes to FPGA, place some signaling signals in memory cells, make sure that at the right moment another signaling device, which you also track or even generate, turns to these memory cells, and as a result, the set of signaling signals delayed in memory activates the signaling signal you need, which, for example, will go to a certain output leg and turn on the LED that is connected to it. Some of the signallers go not to memory, but, for example, to launch a certain part of the algorithm (program). That is, speaking the language of a microproger, these legs are addressable. For example, we have three address pins on our board in our program to enable some unrelated (or related) algorithms that we have implemented in the Verilog language in FPGA... Also in the program, in addition to three address legs, we also have, for example, 20 information legs, through which a set of input signals (for example, from different sensors) comes with any information (for example, the water temperature in the aquarium from the water temperature sensor in the aquarium). 20 legs = 20 bits. 3 legs -3 bits. When the address signal 001 comes (from three address legs), we launch the first algorithm, which writes 20 information signals to 20 memory cells (20 triggers), then the next 20 signals are multiplied by the 20 received earlier, and the result of the multiplication is written into memory, and then sent on other legs, for example, into the water thermostat in the aquarium. But we will send this result only when a code, for example 011, comes to our address legs and starts the reading and transmission algorithm. Well, of course we "send", "read" and write something else manually. We carry out every signal in every step of the work FPGA along a certain path, we do not lose. We process or write. Add or multiply. Don't forget to write it down. Do not forget to receive the next signal and write to other triggers. Also add here the work tied to the clock frequency, synchronization (which is also implemented manually), inevitable errors during the development and debugging stages, and a bunch of other problems that are simply pointless to consider in this article. Hard. For a long time. But on the other hand, it works super quickly at the output, without glitches and brakes. Iron!

Now microcontroller... 20 legs for receiving information - for most microcontrollers physically impossible task. But 8 or 16 - yes please! 3 informational - easy! Program? At address 001, multiply the first received number by the second, at address 011 send the result to the thermostat. Everything! Quickly. Easily. Not great, but prompt. If you write a program very competently, without glitches and brakes. Programmatically!

Hardware and Program! Here is the main thing difference between FPGA and microcontroller.

V microcontroller most of the tricky, but often used algorithms are already embedded in iron (into the crystal). You just need to programmatically call the required library in which this algorithm is stored, call it by name, and it will do all the dirty work for you. On the one hand, it is convenient, it requires less knowledge about the internal structure of the microcircuit. Mikrik takes care of tracking the received, generated and resulting signals, their storage, processing, and delay. He does everything himself. In most microproger tasks, this is what you need. But if all these conveniences are used illiterately, then there is a possibility of incorrect work. Hardware and Program!

Conclusion

Modern developers of processors and microprocessors initially develop their devices for FPGA... Yes, you are guessing correctly: first they imitate the created microcontroller architecture by developing and flashing the program on FPGA, and then measure the execution speed of the algorithms at a particular location of the simulated MC blocks and a particular set of functional of each block separately.

According to the characteristics of the output signal, FPGA most often designed for 3.3V, 20mA, Microcontroller at 5V, 20mA.

Under microcontroller AVR, successfully implemented in the Arduino platform, a lot of open programs have been written, a great many gadgets have been developed in the form of sensors, motors, monitors, and everything that your heart desires! Arduino is now more like a construction set for kids and adults. However, do not forget that the core of this constructor controls smart homes, modern consumer electronics, appliances, cars, airplanes, weapons and even spacecraft. Undoubtedly, such a constructor will be one of the best gifts for any representative of the strong half of humanity.

In principle, everything is simple!

Still have questions? Write a comment. We will answer and help you figure it out =)

Let's see how they really differ and what are the similarities between these two types of digital radio electronic devices.

Both the microprocessor and the microcontroller are designed to perform certain operations - they retrieve instructions from memory and execute those instructions (which are arithmetic or logical operations) and the result is used to service the output devices. Both the microcontroller and microprocessor are capable of continuously fetching instructions from memory and executing those instructions as long as the device is powered up. Instructions are sets of bits. These instructions are always retrieved from a storage location called memory.

What is a microprocessor

Microprocessor (in the English-language literature MPU - Micro Processor Unit ) contains the functionality of a computer central processing unit, or CPU (CPU - Central Processing Unit) on a single semiconductor crystal (IC - integrated circuit or, in the Western manner - Integrated Circuit).

At its core, it is a microcomputer that is used to perform arithmetic and logical operations, systems management, data storage, and others.

The microprocessor processes the data from the input peripherals and transfers the processed data to the output peripherals.

There are four main types of processors that differ in their architecture.

Microprocessors with a full set of instructions (Complex Instruction Set Computer, CISC-architecture). Are characterized by a non-fixed value of the instruction length, coding of arithmetic operations with one instruction, a small number of registers that perform strictly defined functions. An example of this type of processor is the x86 family.

Reduced Instruction Set Computer (RISC) microprocessors. Possess, as a rule, increased performance due to simplified instructions, which simplifies the processdecoding and, accordingly, reduce their execution time. Most GPUs are designed using this type of architecture.

Microprocessors with a minimum instruction set (Minimal Instruction Set Computer, MISC-architecture). In contrast to the RISC architecture, they use long control words, which makes it possible to perform rather complex actions in one cycle of the device operation. The formation of long "command words" became possible due to the increase in the bit capacity of microprocessor devices.

In Superscalar Processors and multiple instruction decoders are usedthat load many execution units with work... Scheduling of the execution of the flow of commands occurs dynamically and is carried out by the computational core itself. An example of a processor with this type of architecture is, for example, the Cortex A8.

I would also like to highlight special-purpose microprocessors(ASIC - Application S pecific I ntegrated C ircuit). As the name suggests, are designed to solve a specific problem. Unlike general-purpose microprocessors, they are used in a specific device and perform certain functions that are specific only to this device. Specialization in the execution of a narrow class of functions leads to an increase in the speed of the device and, as a rule, allows to reduce the cost of such an integrated circuit. Examples of such microprocessors would be a microcircuit designed exclusively to control a mobile phone., microcircuits for hardware encoding and decoding of audio and video signals - the so-called digital signal processors (Digital Signal Processing, DSP multiprocessors). Can be implemented as FPGA (Programmable Logic Integrated Circuit). When developing such processorshardware description languages ​​(HDL - Hardware Description L anguage) are used to describe their functionality such as Verilog and VHDL.

Microprocessor-based systems are built approximately as follows.

As you can see, the microprocessor in this system has many auxiliary devices such as read-only memory, random access memory, serial interface, timer, I / O ports, etc. All these devices exchange commands and data with the microprocessor via the system bus. All auxiliary devices in the microprocessor system are external. The system bus, in turn, consists of an address bus, a data bus and a control bus.

Now, let's take a look at a microcontroller.

What is a microcontroller

Below is a block diagram of the microcontroller. What is its main difference from a microprocessor? All reference devices such as read only memory, random access memory, timer, serial interface, I / O ports are built-in. Therefore, there is no need to create interfaces with these auxiliary devices, and this saves a lot of time for the system designer.

A microcontroller is nothing more than a microprocessor system with all the reference devices integrated in a single chip. If you want to create a device that interacts with an external memory or DAC / ADC unit, you only need to connect the appropriate DC power supply, a reset circuit, and a crystal (clock source). They are simply problematic to integrate into a semiconductor crystal.

The microcontroller core (central processing unit) is usually built on the basis of the RISC architecture.

The program written into the microcontroller's memory can be protected from the possibility of its subsequent reading / writing, which provides protection against its unauthorized use.

Comparing microcontroller and microprocessor

Microprocessor Microcontroller
UsageComputer systemsEmbedded systems
DeviceContains CPU, general registers, stack pointers, program counters, timer, and interrupt chainsContains microprocessor circuitry and has built-in ROM, RAM, I / O devices, timers and counters.
Data memoryHas many instructions for moving data between memory and processor.Has one or two instructions for moving data between memory and processor.
Electrical circuitsHigh complexitySimple enough
ExpensesThe cost of the entire system is increasingLow system cost
Number of registersHas fewer registers, operations are mainly performed in memory.Has more registers, so it is easier to write programs
Memory deviceBased on von Neumann architecture. The program and data are stored in the same memory module.Based on Harvard Architecture. Programs and data are stored in different memory modules.
Access timeMemory and I / O access times are longer.Faster access times for onboard memory and I / O devices.
IronRequires more hardware.Requires less hardware.

Choosing the right device to base your new development on can be tricky. A balance must be struck between price, performance and energy consumption, and the long-term implications of these choices must be considered. For example, if the device being used, be it a microcontroller or a microprocessor, will become the basis for a whole range of new products.

What is the difference between a microprocessor and a microcontroller?

First, let's look at the difference between a microcontroller (MCU) and a microprocessor (MPU). Typically, a microcontroller uses built-in flash memory in which its program is stored and executed. Due to this, the microcontroller has a very short start-up time and can execute code very quickly. The only limitation when using the built-in memory is its finite size. Most microcontrollers available on the market have a maximum flash capacity of ~ 2 megabytes. This can be critical for some applications.

Microprocessors have no memory size limit since they use external memory to store program and data. The program is usually stored in non-volatile memory such as NAND or serial flash memory. At startup, the program is loaded into external DRAM and then executed. A microprocessor is not capable of starting as quickly as a microcontroller, but the amount of RAM and non-volatile memory that can be connected to a processor can reach hundreds or even thousands of megabytes.

Another difference between a microcontroller and a microprocessor is the power supply system. Thanks to the built-in voltage regulator, the microcontroller only needs one external voltage value. Whereas the microprocessor requires several different voltages for the core, peripherals, I / O ports, etc. The designer must take care of the presence of these voltages on the board.

What to choose MPU or MCU?

The choice of microcontroller or microprocessor is determined by some aspects of the specification of the device being developed. For example, a number of peripheral interface channels is required that a microcontroller cannot provide. Or user interface requirements cannot be met using a microcontroller because it lacks memory and performance. When we start developing for the first time, we know that the product can change a lot in the future. In this case, perhaps the best solution would be to use some kind of off-the-shelf platform. In this way, we will take into account the reserve of computing power and interface capabilities for future modifications of the device.

One aspect that is difficult to define is the speed required for the future system to work. This criterion can be quantified using the so-called computing power, which is measured in Dhrystone MIPS or DMIPS (Dhrystone is a synthetic benchmark of computer performance, and MIPS is the number of millions of instructions per second). For example, an Atmel SAM4 microcontroller based on an ARM Cortex-M4 core provides 150 DMIPS, while an ARM Cortex-A5 microprocessor such as the Atmel SAM5AD3 can provide up to 850 DMIPS. One way to evaluate the required DMIPS is to see how much performance is needed to run a part of the application. Running a full operating system (Linux, Android or Windows CE) for your application would require about 300 - 400 DMIPS to run. And if used for RTOS application, then only 50 DMIPS is enough. With RTOS, less memory is also required, since the kernel typically takes up several kilobytes. Unfortunately, a full-fledged operating system requires a memory management unit (MMU) to run, which in turn limits the type of processor cores that can be used.

Applications that handle large volumes of numbers require some margin of DMIPS. The more the application is focused on numerical processing, the more likely it is to use a microprocessor.

The use of the user interface, be it consumer or industrial electronics, requires serious discussion. Consumers are already accustomed to using intuitive graphical interfaces, and industry is increasingly using this method of interacting with the operator.

There are several factors regarding the user interface. First, there is an additional computational load. An interface library such as Qt, which is widely used on Linux, will additionally require 80-100 DMIPS. Second is the complexity of the user interface. The more you use animations, effects and multimedia content, the higher the image resolution, the more performance and memory you will need. Therefore, most likely a microprocessor is suitable here. Alternatively, a simple user interface with a static display on a low resolution display can be implemented on a microcontroller.

Another argument in favor of a microprocessor is the built-in TFT LCD controller. Few microcontrollers include such a module. You can put an external TFT LCD controller and some other drivers for the microcontroller, but you need to take into account the resulting cost of the product.

Flash microcontrollers with TFT LCD controllers are now on the market, but there should still be enough on-board RAM to drive the display. For example, a 16-color QVGA 320x240 requires 150KB of RAM to render the image and update the display. This is a fairly large amount of RAM and external memory may be required, which will also affect the cost price.

More complex graphical user interfaces, especially those using displays larger than 4.3 inches, require the use of microprocessors. While microprocessors dominate applications that use a TFT color user interface, microcontrollers are the king of segment or dot matrix LCDs and other serial displays.

From a communications point of view, most microcontrollers and microprocessors include the most popular ones. But high-speed interfaces such as HS USB 2.0, 10/100 Mbps Ethernet ports, or Gigabit Ethernet ports are usually only found on microprocessors because they are better suited to handle large amounts of data. The key issue here is the availability of the right channels and bandwidth to handle the data stream. Applications that use high-speed connections and are focused on the operating system require the use of microprocessors.

Another key aspect in determining the choice between microcontroller and microprocessor is the requirement for deterministic response times of the application. Because of the processor core, built-in flash memory and software in the form of RTOS (real-time operating system) or pure C code, the microcontroller will definitely lead in this criterion.

The final part of our discussion will be about power consumption. While a microprocessor has power-down modes, a typical microcontroller has many more. In addition, the external hardware of the microprocessor makes it difficult to transition to these modes. The actual consumption of the microcontroller is much lower than that of the microprocessor. For example, in the power saving mode with the preservation of registers and RAM, the microcontroller can consume 10-100 times less.

Conclusion

The choice between microcontroller and microprocessor depends on many factors such as performance, capabilities, and development budget.

Generally speaking, microcontrollers are typically used in cost-optimized solutions where product cost and energy savings are important. They are, for example, widely used in ultra low power applications where long battery life is required. For example, in remote controls, consumer electricity meters, security systems, etc. They are also used where highly deterministic system behavior is required.

Microprocessors are typically used to create functional and high-performance applications. They are ideal for industrial and consumer operating system-based applications where computation is intensive or high-speed communications or expensive user interfaces are required.

And the last thing. Choose a vendor that offers compatible microcontrollers or microprocessors to be able to migrate up or down, increasing software reuse.

The difference between microprocessors and microcontrollers. and got the best answer

Answer from Releboy [guru]
A MICROPROCESSOR is an independent or part of a microcomputer information processing device, made in the form of one or more large integrated circuits (in fact, it is the brain of a microcontroller). The advent of single-chip micro-computers is associated with the beginning of the era of mass application of computer automation in the field of control. Apparently, this circumstance determined the term "controller" (English controller - regulator, control device). Due to the decline in domestic production and the increased import of technology, including computing, the term "microcontroller" (MC) replaced the previously used term "single-chip micro-computer" from use. The first patent for a single-chip micro-computer was issued in 1971 to engineers M. Kochren and G. Boone, employees of the American Texas Instruments. It was they who suggested placing not only the processor, but also the memory with input-output devices on one crystal. When designing microcontrollers, you have to strike a balance between size and cost on the one hand, and flexibility and performance on the other. For different applications, the optimal ratio of these and other parameters can vary greatly. Therefore, there are a huge number of types of microcontrollers that differ in the architecture of the processor module, the size and type of built-in memory, the set of peripheral devices, the type of package, etc. While 16-bit general-purpose processors have long been completely supplanted by more efficient models, 8-bit microcontrollers continue to be widely used. This is because there are a large number of applications where high performance is not required but low cost is important. At the same time, there are microcontrollers with more computing power, such as digital signal processors. Today, the term microcontroller is a computer that automatically controls peripheral devices without operator intervention. They usually work at lower levels of automation. Modern personal computers are powerful and high-speed microcontrollers aimed at performing a huge number of operations and functions with the participation of an operator. Collect and process information from controllers. Used at high levels of automation.

Answer from Erenky[guru]
as I know the microprocessor is already programmed. and the microcontroller can be programmed as you want, depending on the tasks, one and the same controller can control the operation of a multi-digit indicator with different counts, generate a frequency, control the switching of various devices, even at HF ​​control the operation of an interface (for example, a modem), they are usually used in relatively inexpensive multifunctional devices in Depending on the time of release, the device functional service may differ, set by the program


Answer from Vladimir Nikolaev[guru]
Microcontroller - a computer on one microcircuit. Designed to control various electronic devices and interact between them in accordance with the program embedded in the microcontroller. Unlike microprocessors used in personal computers, microcontrollers contain built-in additional devices. These devices perform their tasks under the control of the microprocessor core of the microcontroller.

It's amazing how little technology has changed the face of personal computers. From the first commercial microprocessor (4-bit 4004) that Intel developed in 1971 for the more advanced and versatile 64-bit Itanium 2, microprocessor technology has moved into an entirely new field of next-generation architecture. Advances in microprocessor technology have made personal computing faster and more reliable than ever before. If the microprocessor is the heart of the computer system, the microcontroller is the brain. Both the microprocessor and the microcontroller are often used synonymously for each other due to the fact that they have common functions and are specifically designed for real-time applications. However, they also have their share of differences.

What is a microprocessor?

A microprocessor is an integrated silicon-based chip with only a central processing unit. It is the heart of the computer system, which is designed to perform a variety of data-related tasks. Microprocessors do not have RAM, ROM, IO pins, timers and other peripherals on the chip. They need to be added externally to make them functional. It consists of an ALU that handles all arithmetic and logical operations; a control unit that manages and controls the flow of instructions throughout the system; and Register Array, which stores data from memory for quick access. They are intended for general purpose applications such as logical operations on a computer system. In simple terms, it is a fully functional single integrated circuit processor that is used by a computer system to do its job.

What is a microcontroller?

A microcontroller is like a mini-computer with a processor, along with RAM, ROM, serial ports, timers, and I / O peripherals built into a single chip. It is designed for specific tasks requiring a certain degree of control, such as a TV remote, LED display panel, smart watches, vehicles, traffic light control, temperature control, etc. It is a high quality device with a microprocessor, memory and I / O ports on one chip. These are the brains of a computer system that contain enough circuitry to perform certain functions without external memory. Since it has no external components, it has less power consumption, making it ideal for battery-powered devices. Simple talk, a microcontroller is a complete computer system with less external hardware.

Difference between microprocessor and microcontroller

1) Technology used in microprocessor and microcontroller

A microprocessor is a programmable multipurpose silicon chip that is the most critical component in a computer system. It is like the heart of a computer system, consisting of an ALU (Arithmetic Logic Unit), a control unit, instruction decoders and an array of registers. The microcontroller, on the other hand, is the heart of the embedded system, which is a by-product of microprocessor technology.

2) Microprocessor and microcontroller architecture

A microprocessor is simply an integrated circuit with no RAM, ROM, or I / O pins. Basically it refers to the central processing unit of the computer system, which retrieves, interprets and executes the commands given to it. It integrates the functions of the CPU into a single integrated circuit. Microcontrollers, on the other hand, are more powerful devices that contain microprocessor circuitry and have RAM, IO and processor in a single chip.

3) Work of the microprocessor and microcontroller

The microprocessor requires an external bus to connect to peripherals such as RAM, ROM, Analog and Digital IO, as well as serial ports. The ALU performs all arithmetic and logical operations from memory or input devices and executes the results on output devices. A microcontroller is a small device with all the peripherals embedded on a single chip and is designed to perform specific tasks, such as executing programs to control other devices.

4) Data memory in microprocessor and microcontroller

The data memory is part of the PIC that contains special function registers and general purpose registers. It stores data temporarily and stores intermediate results. Microprocessors execute several instructions that are stored in memory and send the results to the output. Microcontrollers contain one or more processors along with RAM and other peripherals. The CPU fetches instructions from memory and executes the results.

5) Storage in microprocessor and microcontroller

Microprocessors are based on the von Neumann architecture (also known as the von Neumann model and the Princeton architecture), in which the control unit receives commands by assigning control signals to the hardware and decodes them. The idea is to store instructions in memory along with the data that the instructions act on. Microcontrollers, on the other hand, are based on the Harvard architecture, where instructions and program data are stored separately.

6) Microprocessor and microcontroller applications

Microprocessors are a single-chip mass storage device and are embedded in several applications such as specification control, traffic light control, temperature control, test instruments, real-time monitoring system and more. Microcontrollers are mainly used in electrical and electronic circuits and devices with automatic controls such as high quality medical instruments, car engine control systems, solar chargers, game machine, traffic light control, industrial control devices, etc.

Microprocessor vs. Microcontroller: Comparison Chart

Summary of microprocessor and microcontroller

The key difference between these terms is the availability of peripherals. Unlike microcontrollers, microprocessors do not have on-board memory, ROMs, serial ports, timers, and other peripherals that make up a system. An external bus is required to communicate with peripheral devices. On the other hand, a microcontroller has all the peripherals like processor, RAM, ROM and IO embedded in one chip. It has an internal control bus that is not available to the designer. Since all components are packaged in a single chip, it is compact, making it ideal for large scale industrial applications. The microprocessor is the heart of the computer system, and the microcontroller is the brain.