What is the difference between microprocessor and microcontroller. Explain the difference between microprocessor and microcontroller

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

Answer from Releboy[guru]
MICROPROCESSOR - an independent or part of a micro-computer information processing device, made in the form of one or more large integrated circuits (in fact, this is the brain of a microcontroller). With the advent of single-chip microcomputers, the beginning of the era of mass application of computer automation in the field of management is associated. Apparently, this circumstance determined the term "controller" (English controller - regulator, control device). Due to the decline in domestic production and increased imports of equipment, including computing, the term "microcontroller" (MC) has displaced the previously used term "single-chip microcomputer". The first patent for a single-chip microcomputer was issued in 1971 to engineers M. Kochren and G. Bun, employees of the American Texas Instruments. It was they who proposed to place not only the processor, but also the memory with input-output devices on one chip. When designing microcontrollers, a balance must be struck 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 processors general purpose long and completely superseded by more productive models, 8-bit microcontrollers continue to be widely used. This is due to the fact that there a large number of applications that do not require high performance but low cost is important. At the same time, there are microcontrollers that have more computing power, such as digital signal processors. Today, the term microcontroller is a computer that controls peripheral devices in automatic mode without the participation of the operator. Usually work at the lowest 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 on high levels automation.

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


Answer from Vladimir Nikolaev[guru]
A microcontroller is a computer on a single chip. 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.

The microprocessor and microcontroller are typical programmable electronic chips used for various purposes. The essential difference between the two is that a microprocessor is a programmable computing engine composed of ALUs, CUs, and registers, commonly used as a processing unit (such as the CPU in computers) that can perform calculations and make decisions. On the other hand, a microcontroller is a specialized microprocessor which is considered as a "computer on a chip" as it integrates components such as microprocessor, memory and parallel digital I/O.

The microcontroller is primarily designed to control tasks in real time, unlike the microprocessor.

comparison table

Basis for comparisonMicroprocessormicrocontroller
basicConsists of a single silicon chip containing ALU, CU and registers.Consists of microprocessor, memory, I/O port, interrupt control unit, etc.
CharacteristicDependent unitAutonomous block
I/O portsDoes not contain a built-in I/O portBuilt-in I/O ports present
Type of operation performedGeneral purpose in design and operation.Oriented to the application or subject area.
Target forTop class marketEmbedded Market
Power consumptionProvides fewer power saving optionsIncludes more power saving options

Microprocessor Definition

microprocessor with The silicon chip works like a central processing unit (CPU). It can perform functions, including logic and arithmetic, according to predefined instructions specified by the manufacturer. The CPU consists of an ALU (arithmetic and logic unit), a register and a control unit. The microprocessor can be designed different ways depending on the instruction set and system architecture.

There are two system architectures for designing a microprocessor - Harvard and Von Neumann. Harvard-type processor built into isolation rails for program and data memory. In contrast, a von Neumann-based processor shares a single bus for program and data memory.

The microprocessor is not an independent unit, it depends on other hardware units such as memory, timer, interrupt controller, etc. The first microprocessor was designed by Intel in 1971 and named Intel 4004.

Microcontroller Definition

microcontroller is a technology developed after the microprocessor that overcomes the shortcomings of the microprocessor. The microcontroller chip is highly integrated with the processor, memory (RAM and ROM), registers, interrupt control units, and dedicated I/O ports. It seems to be a microprocessor add-on. Unlike the microprocessor, the microcontroller does not depend on other hardware blocks, it contains all the necessary blocks for proper functioning.

The microcontroller is more valuable than the microprocessor in the field of embedded systems because it is more economical and readily available. The first TMS 1000 microcontroller was developed by Texas Instruments in 1974. The basic design of a TI microcontroller resembles Intel processor 4004/4040 (4-bit), in which the developers added support for RAM, ROM, I / O. Another advantage of the microcontroller is that we can write user instructions to the processor.

Key Differences Between Microprocessor and Microcontroller

  1. The microprocessor consists of a silicon chip having an arithmetic logic unit (ALU), a control unit (CU) and registers. Conversely, a microcontroller includes the properties of a microprocessor as well as RAM, ROM, counters, I/O ports, and so on.
  2. The microprocessor requires a group of other chips, such as timers, interrupt controllers, and program and data memory, which makes it dependent. In contrast, the microcontroller does not require other hardware blocks as it is already included with it.
  3. The microcontroller provides implicit I/O ports while the microprocessor does not use built-in I/O ports.
  4. The microprocessor performs general purpose operations. In contrast, the microcontroller performs application operations.
  5. In the microprocessor, the main focus is on performance, so it is aimed at the high-end market. On the other hand, the microcontroller is aimed at the embedded market.
  6. The use of energy in the microcontroller is better than in the microprocessor.

Conclusion

The microprocessor can perform general purpose operations for several various tasks. On the contrary, the microcontroller can perform user-defined tasks, where it performs the same task throughout its entire life cycle.


WHAT IS MICROPROCESSOR, MICROCONTROLLER AND
PROGRAMMABLE LOGIC CONTROLLER

The rapid development of electronics is rapidly changing our lives, and we notice this, first of all, in the social sphere, the fields of communication (communication) and communication. The first thing that comes to mind in this regard is computers, the Internet and Cell Phones. We are free to search for the necessary information, we have the opportunity to get in touch with the desired subscriber, regardless of our location. We can receive distance education and join groups based on professional, social or cultural interests. All this became possible largely due to the advent of the microprocessor and the creation of microprocessor systems.

But are there other manifestations of the progress of microelectronics that are not so noticeable at first glance, but play a significant role in our lives?

Yes! microprocessors and microcontrollers are widely used in household appliances, automotive electronics, aerospace and military industries and, of course, in industrial production.

This article reveals some aspects of the use of microprocessor systems in engineering and industry. If the following text seems too heavy and incomprehensible to you, we recommend that you first read the article “Fundamentals of Informatics. Components of microprocessor systems".

  • What is a microprocessor?
  • What is a microcontroller? What are its features?
  • Where are microcontrollers used?
  • How is a microcontroller different from a microprocessor?
  • What is a signal processor?
  • What is a programmable logic controller (PLC)? How is it built?
  • How is a PLC programmed?

You probably already know that any computer is a machine for processing information, regardless of what specific task it performs. The microprocessor is the central element of a computer. If you ask a high school student: - What is a microprocessor? - then, most likely, you will get the answer "The microprocessor is the heart of the computer."

Microprocessor is a microelectronic programmable device designed to process information and manage the exchange of this information as part of a microprocessor system (computer).

Why "microelectronic"? Because microprocessors are produced using modern microelectronics technologies based on a semiconductor crystal. Information in a microprocessor system is transmitted by electrical impulses. Structurally, the microprocessor is executed in the form of a single microcircuit (sometimes several). The microcircuit consists of a plastic or ceramic case, inside of which a miniature semiconductor lining is placed (Fig. 1). On this lining, laser "drawn" all electronic circuits microprocessor. The inputs and outputs of the padded circuit are connected to metal leads located on the sides or bottom of the microcircuit case.



a) b)

Rice. one. integrated circuit(a) and its internal structure (b)


Why is a microprocessor a "programmable device"? Because microprocessor systems in general case universal, i.e., capable of performing a wide range of information processing tasks. And to perform a specific task, the microprocessor is “tuned” using a program - a sequential list of machine instructions.

Mandatory components of the microprocessor are registers, an arithmetic logic unit (ALU) and a control unit. Registers are intended for temporary storage of data, the arithmetic logic unit is for performing arithmetic and logical operations(i.e. for data processing). The control unit is responsible for the sequential execution of program commands and the correct redirection of data flows.

The microprocessor cannot work by itself. It is the central link of the microprocessor system, which also includes devices for constant and random access memory, input and output devices, hard disk drives (the so-called "hard drives"), etc. Such microprocessor systems are actually called computers.

A personal computer can have many uses, but it is quite expensive and bulky. But how to endow household appliances, cars, medical devices with elements of intelligence? How to make them "smart"? It is clear that it is impossible to install an air conditioner in a household system unit conventional computer. This will increase its cost by two to three times. And as part of the so-called smart TV, we will not find a separate personal computer in its usual form. To automate this kind of technology, special processor devices have been developed and manufactured - single-chip microcontrollers (English: "Microcontroller"). The English word "control" means "to control", "to manage". Thus, a microcontroller is a special microprocessor designed to automate various devices and control their operation.

So, microcontroller is a specialized microelectronic programmable device designed for use in control units of various technical products, data transmission systems and process control systems.

Microcontrollers are used in household appliances, medical devices, elevator control systems, telephones, walkie-talkies and other means of communication, electronic musical instruments and car radios, computer peripherals (keyboards, joysticks, printers, etc.), traffic lights, automatic gates and barriers, interactive children's toys, cars, locomotives and airplanes, robots and industrial machines.



Rice. 2. Fields of application of microcontrollers.


Microcontrollers are also widely used in automotive electronics. For example, a Peugeot 206 car has 27 microcontrollers on board, while high-end cars such as the BMW 7 series use more than 60 microcontrollers. They regulate the stiffness of the adaptive suspension, control fuel injection, lighting equipment, wiper motors, power windows and rear-view mirrors, etc. (Fig. 3).


Rice. 3. Use of microcontrollers in automotive electronics
(Based on Microchip Technology).


A microcontroller, unlike a microprocessor, usually has a small bit capacity (8 - 16 bits) and a rich set of instructions for manipulating individual bits. Bit commands make it possible to control discrete equipment (raise / lower the barrier, turn on / off the lamp, heater, start / stop the engine, open / close the valve, etc.) The means that provide the ability to operate with individual bits, input and output discrete signals are called "bit processor."

Another of the main differences between a microcontroller and a microprocessor is that the controller chip contains all the necessary elements to build a simple (and sometimes quite complex) control system. So, inside the microcontroller there is data memory(RAM), program memory (non-volatile memory), clock generator, timers, counters, parallel and serial ports. Therefore, a system of minimal configuration based on a microcontroller can consist of a power supply, a controller chip itself, and several passive elements (resistors, capacitors, and a quartz resonator). And in fact, it is nothing more than a single-chip single-board mini-computer suitable for embedding in a control object. The average cost of a minimum configuration system is several tens of dollars (compare with the average cost of a personal computer).

A typical microcontroller architecture (Fig. 4) contains a synchronization and control system (1), an arithmetic logic unit (2), general-purpose registers (3), data memory (4) and program memory (5), ports (6), functional devices (timers, counters, pulse-width modulators, interfaces) and registers for their settings (7), fig. four.


Rice. 4. Architecture of a typical microcontroller.


Programs for microcontrollers are created in special integrated tool environments ( English.: I integrated D development E nvironment, IDE) assembly languages ​​(machine commands) or C++.

It remains to add that billions of microcontrollers are sold annually in the world, and an ordinary inhabitant of a developed country comes into contact with microcontrollers dozens of times during the day, which are an integral part of the modern technological environment.

In addition to general-purpose microprocessors and microcontrollers, there are so-called signal processors on the market that are specifically designed for real-time signal processing. They are used in measuring instruments, means of communication, transmission and playback of audio and video streams, location systems, space and military equipment.

Signal Processors (English.: D digital S ignal P rocessor, DSP) are characterized by high bit depth and speed, they have special instructions in the command system for implementing typical digital signal processing (DSP) algorithms. Also on the same chip, in addition to the actual processor part, analog-to-digital and digital-to-analog converters are implemented. BUT tax- C digital P the converter (ADC) replaces the continuous input signal with the corresponding stream of digital data (samples). Further, these data are processed by the processor part, after which, using C ifro- BUT tax P converter (DAC), the processed digital data is again reproduced in analog signal. In this way, the signal processor can deepen the clarity of the image, or, conversely, blur it, encrypt and decrypt audio and video streams, play virtual or augmented reality on the screen, track moving objects even in conditions of significant interference and incomplete input information.


TYPES OF MICROPROCESSORS

General purpose microprocessors Microcontrollers Signal Processors Other
(neurochips, sectional and hybrid processors)
Apply:
for building personal computers, servers and multiprocessor systems.
Apply:
to implement simple control and automation functions.
Apply:
to implement complex algorithms for streaming data processing in real time.
Apply:
to build unique experimental or specific systems.
Peculiarities:

high digit,
universal architecture.
Peculiarities:
built-in program memory and data memory,
bit Processor,
timers, counters, ports, interfaces.
Peculiarities:
high computing performance,
commands for the implementation of typical signal processing algorithms,
built-in ADC, DAC or media interfaces.
Peculiarities:
building one processor on several chips,
combination of several types of processors in one product,
specific architecture

Another type of microprocessor devices that have taken their market niche over the past 30-40 years are the so-called programmable logic controllers.

P programmable L ogical To controller(PLC; English.: P programmable L ogic C controller or PLC) is a specialized microprocessor system that is used to automate technological processes and general industrial installations and complexes (conveyors, roller tables, cranes, crushers, mills, classifiers, mixers, presses, packaging machines, robotic and flexible production complexes, etc.)

That is, the main scope of the PLC is the sphere of industrial production. However, they are also used for building automation (access control to the premises, control of lighting, heating, ventilation and air conditioning, control of elevators, escalators, etc.) PLCs can also be used to create a microclimate in greenhouses, poultry farms, livestock farms.

In general, a PLC is a single-board mini-computer built on the basis of a single-chip microcontroller and located in a typical brick-sized case. There are also modular controllers (Fig. 5). PLC inputs can be connected to buttons, joystick contacts, switches (i.e. controls), sensors and actuators (motors, lamps, heating elements valves, valves, actuators, etc.) The PLC polls the input signals (controls and sensors) cyclically, executes the user program (recalculates the values ​​of variables) and issues the resulting output values ​​to the actuators. That is, the PLC executes the same program (user program) cyclically over and over again.



Rice. 5. Programmable logic controllers.


In addition to hardware unification (the use of standard sizes, voltage levels, types of signals), the breakthrough spread of PLCs was facilitated by the fact that intuitive “general engineering” programming languages ​​were developed for them. Now, to develop a user program, it is not necessary to invite a high-class programmer. This can be handled (sometimes even better) by a technologist, an electrician, a chemist, and, of course, an automation specialist. And in the case of complex tasks, these programming languages ​​erase the line of misunderstanding between the programmer and the engineer. They are equally clear to both the customer (engineer) and the performer (programmer).

There are 6 such programming languages ​​(5 are standardized), and 4 of them are visual (that is, the program is entered not in the form of text, but as a set of graphic elements (blocks) connected to each other, (Fig. 6).




Usually the same controller can be programmed in several languages ​​of the user's choice. To do this, use tools software complexes, allowing not only to develop a program, but also to debug it using program model controller (on the “simulator”) or in monitoring mode (when the user program is executed by a real controller, and you can monitor its operation on the computer display).

Hardware and software unification of the PLC makes it easy to switch to controllers from another manufacturer, transfer programs from one platform to another. This increases the flexibility of automation systems, promotes competitive innovative development of the market.

You can study in detail the operation of microprocessor systems, learn how to develop and program application mini-computers and programmable logic controllers for automation tasks at the National Mining University.


Key difference A: The difference between a microprocessor and a microcontroller is the availability of RAM, ROM, and other peripherals in the microcontroller. A microprocessor contains only a processor and no other components.

Microprocessor and microcontroller, both are the main processors designed to run computers. The functions of both processors are the same. The main difference between the two is that microprocessors perform various functions whereas microcontrollers are small computers designed for specific tasks. This article helps to find more differences between the two processors.

Microprocessors are commonly referred to as the central processing unit or microcomputer processor. It is said to be the heart and brain of a computerized machine.

The microprocessor is needed to perform many tasks. It is a small computer that is used to perform arithmetic and logical operations such as system control, data storage, etc. The microprocessor processes the input or output of peripherals and gives a function to return the results. The first commercial microprocessor was released by Intel in November 1971 and was named 4004; it was a 4-bit microprocessor.

The operations performed by the microprocessor are general in purpose. Therefore, it is considered necessary to perform any logical operations on a computerized machine. Microprocessors are tuned to chips; it is made of miniature transistors and some other circuit elements on a single semiconductor IC to perform its tasks in a computer. It is abbreviated as "µP" or "uP". There are five main types of processors:

  • Complex instruction set of microprocessors
  • Reduced instruction set microprocessors
  • Superscalar processors
  • ASIC
  • Digital signal multiprocessors

A microcontroller is an embedded computer optimized for controlling electrical devices. It is a device that includes a microprocessor, memory, and input/output devices on a single chip. It is said to be the heart of an embedded system.

Microcontrollers are of a specific nature for the task they are supposed to perform. It has a microprocessor on its board to perform all the logical operations of the gadget. Once a microcontroller is programmed, it can operate on its own with a stored instruction set and can perform operations or tasks as needed. It is intended to be self-sufficient and profitable. In addition, the microcontroller is a set of fractions in the system, which is fundamental to complete printed circuit board. A "fixed computer system" is designed to perform one or more functions over and over again in real time. This system is built as an element in the hardware and motorized elements of a computerized machine.

Microcontrollers are designed to perform specific operations that help control specific systems. It is abbreviated as "uC", "µC", or "MCU".

Microcontrollers are like a small computer in which the CPU, memory unit such as RAM and ROM, I/O peripherals, timers, counters are built into one integrated circuit, i.e. IC. They are easily connected to external peripherals such as serial ports, ADC, DAC, Bluetooth, Wi-Fi, etc. Here, the pairing process is faster compared to microprocessor pairing. In most cases, microcontrollers use the RISC or CISM architecture to perform tasks on different machines. different types microcontrollers:

  • 8-bit microcontroller
  • 16-bit microcontroller
  • 32-bit microcontroller
  • Embedded microcontroller
  • Embedded microcontroller

Comparison between microprocessor and microcontroller:

Microprocessor

microcontroller

This is the heart of the computer system.

This is the heart of the embedded system.

Contains

It contains the CPU, general purpose registers, stack pointers, program counters, clock, and interrupt circuitry.

It contains the microprocessor circuitry and has built-in ROM, RAM, I/O devices, timers, and counters.

Data memory

It has many instructions for moving data between memory and processor.

It has one or two instructions for moving data between memory and processor.

This is big.

This is small.

Price

The cost of the entire system increases.

The cost of the entire system is low.

Bit Instructions

It has one or two bit processing instructions.

It has many bit handling instructions.

Registration numbers

Has fewer registers; hence the operations are memory based.

It has more quantity registers; hence programs are easier to write.

Storage

It is based on the von Neumann architecture, where program and data are stored in the same memory module.

It is based on the Harvard architecture where program memory and data memory are stored in a separate module.

The access time to memory and I/O devices is longer.

Less access time to built-in memory and I/O devices.

hardware

This requires more hardware.

It requires less equipment.

Altera-Cyclone and Arduino

Essence of the question. Difference between FPGA and microcontroller

Each beginner microprogrammer at a certain stage of his development wonders what difference between FPGA(from Altera or Xilinx) and microcontroller(microprocessor)?

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

Now let's stop and ask ourselves why FPGA- stupid light bulb, and Arduino - smart robot? After all, both the first and second seem to be a programmable device, do FPGA there are not enough opportunities for the robot?

To some extent, the essence of the question "What difference between FPGA and microcontroller? is revealed in this 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 pipeline processing capabilities, 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 by several times, and even dozens of times. Exactly FPGA here in 99% of cases it is much inferior to MK. And it's not at all in 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: in FPGA and there are no complicated automated chains (doing some of the work for you). There are only iron wire routes and highways, inputs, outputs, logical blocks and memory blocks. Among the traces there is a special class - a trace for clocking (tied to certain legs, 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 separate places in the board, consisting of cells. Blocks are used for storing information, multiplication, addition and logical operations on signals in general.

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

The transistor is the main element of TTL logic.

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

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

FPGA architecture. The relationship of constituent elements

The traces are connected to the blocks using special CMOS transistors. These transistors are able to maintain their state (open or closed) for a long period of time. The state of the transistor changes when a signal is applied along a certain trace, which is used only when FPGA programming. That is, at the moment of firmware, voltage is applied to a certain set of CMOS transistors. This set is determined by the firmware program. Thus, a complex construction of a huge network of tracks and highways takes place inside FPGA, linking together 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 interconnects 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 signals are carried out independently of you. You only specify what to do with this or that set of received signals and where to issue 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 on permanent highways (and not reflashable). Among the blocks of MK, the main ones can be distinguished:

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

Random access memory (RAM) is the memory used microcontroller for temporary storage of data (like triggers in FPGA). For example, when calculating in several actions. Suppose 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 the 1st action will be entered into the RAM for the duration of the second, then the result of the 2nd action will be entered. And then both of these results will go from RAM to calculate 3 actions.

Processor is a calculator microcontroller. It communicates with RAM, as well as with permanent. With operational there is an exchange of calculations. From the constant, the processor receives commands that cause the processor to perform certain algorithms and actions with signals at the inputs.

I/O facilities (ports) and serial I/O ports - pins microcontroller designed to interact with the outside world.

Timers are blocks designed to count the number of cycles when executing algorithms.

Bus controller - a block that controls the exchange between all blocks in microcontroller. It processes requests, sends control commands, organizes and streamlines communication within the crystal.

An interrupt controller is a block that receives interrupt requests from external devices. Interrupt request - signal from external device, informing that he 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 clock pulses on which the entire microcontroller operation.

The relationship of the constituent blocks of the microcontroller

AT microcontroller, in differences from FPGA, the work takes place between the above blocks, which have a complex architecture facilitating the software development process. When flashing, you only change 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, almost over the entire area of ​​the crystal. Signals pass through complex chains of transistors. The microprocessor is flashed at the level of the program for iron, the 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 architectures wins in speed and wider possibilities of pipeline processing, MK wins in the simplicity of writing algorithms. Due to more easy way program descriptions, developer's fantasy microcontroller less constrained by time for debugging and development, and, thus, the time for programming the same robot on MK and FPGA will be differ many, many times. However, a robot running on FPGA will be much faster, more accurate and more agile.

Hardware and software.

AT 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 coming into FPGA, place some signals in memory cells, make sure that at the right time exactly these memory cells are addressed by another signal that you also track or even generate, and as a result, a set of signals held in memory activates the signal you need, which, for example, will go to a specific output pin and turn on the LED that is connected to it. Some of the signals do not go to memory, but, for example, to launch a certain part of the algorithm (program). That is, in the language of a microprogrammer, these legs are addressable. For example, we have three address legs on our board in our program to enable some unrelated (or related) algorithms that we 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 comes (for example, from different sensors) with some information (for example, the water temperature in the aquarium from the water temperature sensor in the aquarium). 20 pins = 20 bits. 3 legs - 3 bits. When the address signal 001 arrives (from three address legs), we launch the first algorithm that writes 20 information signals to 20 memory cells (20 triggers), then multiply the next 20 signals by the previously received 20, and write the multiplication result to memory, and then send on other legs, for example, in the thermostat of water in an 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 conduct each signal in each cycle of work FPGA along a certain path, we do not lose. processing or recording. Add or multiply. Don't forget to write it down. Do not forget to accept the next signal and write it to other triggers. Also add here the work tied to clock frequency, synchronization (which is also implemented manually), inevitable errors at the development and debugging stages, and a bunch of other problems that are simply pointless to consider in this article. Difficult. For a long time. But at the output it works super quickly, 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 information - to the easy! Program? Multiply the first received number by the second at address 001, send the result to the thermostat at address 011. All! Fast. Easily. Not great, but efficient. If you write a program very competently, without glitches and brakes. Programmatically!

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

AT microcontroller most of the confused, but often used algorithms are already hardwired into the iron (into the crystal). You just need to call programmatically the right 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, this 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, delay. He does everything himself. In most microprogramming tasks, this is what you need. But if you use all these conveniences illiterately, then there is a possibility of incorrect work. Hardware and Software!

Conclusion

Modern developers of processors and microprocessors initially develop their devices on FPGA. Yes, yes, you guessed correctly: first they imitate the generated microcontroller architecture through the development and firmware of the program on FPGA, and then measure the speed of algorithm execution for a particular location of the simulated MC blocks and a particular set of functionality for 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 embedded in the Arduino platform, written a lot open programs, a great many lotions have been developed in the form of sensors, engines, monitors, and everything your heart desires! Arduino is now more like a play kit for kids and adults. However, do not forget that the core of this constructor controls "smart homes", modern consumer electronics, appliances, cars, aircraft, weapons and even spacecraft. Undoubtedly, such a designer will be one of the best gifts for any representative of the strong half of humanity.

In principle, everything is simple!

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

A computer