Today we live in a world that electronic devices have become an essential part of, and while our interaction with electronics may seem limited to personal computers, tablets and smartphones, there are other elements that play an important role in our life even though we may not see them with the naked eye or even feel Its effect. The talk here is about microcontrollers (or microcontrollers) that form the backbone of embedded systems and many of the devices and technologies that we use on a daily basis and we do not really know how they work and how to carry out their tasks.
Through this article, we will shed light on microcontrollers, their structure, development, relationship between them and microprocessors and computer systems, their most important characteristics and advantages, in addition to the most famous microcontrollers available at the present time and their manufacturers.
Introductory introduction to microcontrollers
The microcontroller is an integrated electronic chip that can be viewed as a small computer, and this means that the microcontroller contains all the basic elements of the computer system: a CPU, memory units, I / O units, data input and output units, in addition to other terminals that provide Diverse functions of microcontroller.
Microcontrollers are very similar to the integrated systems on the SoC: System-on-Chip, except that the integrated systems on a chip are considered more comprehensive, as many of these systems contain a microcontroller within them in addition to other units and terminals that help to perform more complex tasks. An example of a system embedded within a chip is the processor chip of smartphones.
The main use of microcontrollers is in automatically controlled devices and products, that is, their operation does not require direct control from the user, but rather they operate on their own depending on their software or operating system provided with it. Examples of such devices and products are what is known as "Embedded Systems", such as electronic control systems in automobile and aircraft engines, electronic systems that drive implanted medical devices, electronic systems in portable medical devices with low energy consumption, electronic systems used in applications Measuring temperature, humidity, reading biometric information (handprint, eye print ...).
A historical overview of microcontrollers evolution
At the beginning of the seventies of the last century, the American company Intel announced the manufacture of the first microprocessor in history, the Intel-4004 processor based on a 4-bit architecture, and it was officially launched for commercial use in 1972. After that, Intel returned again to launch the first processor with the architecture The 8-bit Intel-8008 processor was followed by the Intel-8080 processor. These events were considered a technical revolution at that time as they opened the door to the possibility of greatly reducing the size of computers and investing in semiconductor technology to manufacture electronic circuits capable of performing complex computational tasks.
Despite the importance of announcing the first microprocessor, it was not easy at that time to use it on a large scale in commercial applications due to the high cost that accompanied it, as the design of a complete computer system would require the presence of memories, storage units and other necessary peripherals, and thus the cost of designing the system The computer as a whole reached by that time several hundreds of dollars, which is a very high number when taking currency exchange values in the 1970s.
At that time, while Intel was busy with its microprocessors, two Texas Instruments engineers worked on manufacturing an electronic chip that includes a central processing unit in addition to a RAM and ROM readout in addition to I / O units, and the result was the announcement The TMS1000 microcontroller that became commercially available in 1974, and is today considered by many as the first microcontroller ever manufactured.
After that, the wheel of microcontroller development began to take an accelerating trend, as Intel launched its first microcontroller in 1976, Intel-8048, then in 1980 launched the Intel MCS-51 family of microcontrollers, known commercially by its famous name 8051, which came with an 8-bit architecture with Many important terminals in the embedded system space, such as two timers, four general purpose registers, are based on a modified Von Neumann architecture that contains separate space of memory to store program instructions and data. Intel was able to achieve huge success with the 8051 family of mini-controllers, especially during the 1980s and 1990s.
By the mid-1980s, other companies began to compete in the field of manufacturing micro-controllers, especially Atmel, which launched its At89C51 microcontroller based on Intel's 8051 architecture with its inclusion in flash memory (flash) in 1985, and Microchip followed the same year to launch Its PIC16C64 microcontroller in the same year, as did Motorola which launched its first ADC microcontroller in the same year, the Motorola 68HC11.
In a separate context, the British company Acron announced the famous ARM architecture for the first time in 1985, which relies on the RISC architecture that provides lower energy consumption thanks to its reliance on fewer instructions compared to the CISC architecture. Initially, the name ARM meant Acron RISC Machines and later turned into Advanced RISC Machines when ARM Holdings, responsible for designing ARM architectures for microcontrollers and embedded systems within the SoC chip, was founded.
The dominance of microcontrollers based on the 8051 architecture continued until the 1990s, which mostly relied on two types of reading memories: EPROM, whose content can be erased by exposure to ultraviolet light or PROM, and it is a one-time programmable read-only memory. By 1993, there was a great technical development in the field of reading-only memories, which was the announcement of electrically erasable reading memories, or EEPROM, and here Microchip rushed to launch the first microcontroller that possesses a memory of this type, which is the PIC16C84. The next important step was for Atmel to launch its famous AVR architecture in 1996, which also relies on RISC and Harvard architecture, and the AVR and PIC family microcontrollers became the most popular and used in most applications, and 8-bit controllers remained the most popular and used. in the markets.
With the beginning of the new century, interest in using 16-bit and 32-bit microcontrollers began to increase, and other companies began entering the line of competition, such as NXP with the LPC series controllers, STMicroelectronics with its famous STM32 series, and Infineon with the XMC series of controllers, and in 2011 it exceeded sales of controllers. 16-bit controllers are equivalent to 8-bit controllers, and nowadays, 32-bit controllers based on ARM Cortex-M are the most preferred in many applications and uses of microcontrollers, especially in the industry. 8-bit controllers remain very popular in applications that do not require advanced performance or have terminals capable of performing complex operations (such as a DSP or FPU).
The general box diagram for the microcontroller architecture
After reading the historical overview of microcontrollers, we will realize that there are many families and chains of controllers that are produced by different companies depending on different architectures and structures. Despite this, the basic units that make up the microcontroller can be divided into the following:
- CPU
- RAM
- ROM and ROM instruction storage
- Special Registers
- Bus-System
- I / O Pins
- Other auxiliary terminals
As for other terminals such as ADC, timers, or serial communication units such as UART, SPI, I2C, or advanced processing units such as FPU, they are all different and differ between the families and types of controllers, as they may all be found in Some types, and some of them may exist, and they may exist in different quantities, meaning that we may find temporary or temporary or even three timers, and we may find support for one standard of serial communication standards, or for two of them, or for all of them and so on. What is important to know here is that choosing a microcontroller according to the terminals it contains depends on the nature of the application and the use it is intended for.
Returning to the basic units that make up the microcontroller, it can be explained and clarified its function as follows:
CPU: In principle, the CPU inside the microcontroller performs the same tasks as the CPU used in personal computers, as it consists of the same two basic components: the ALU arithmetic and logic unit and the control unit. However, the processor inside the microcontroller chip is not the same as the processor used in personal computers: the frequency of operation of the processor on microcontrollers is much lower (than the order of kilohertz in 8-bit controllers). The processor architecture in the microcontrollers is optimized to ensure the lowest possible energy consumption at the expense of their ability to perform complex arithmetic operations, although they have recently been included with units that help perform complex tasks (such as a floating point computing unit (FPU) or digital signal processor (DSP), and memory protection and management units).
RAM: Random access memory stores data and information of temporary use during the program’s operation. This memory keeps data throughout the program’s life, but in the event of a sudden interruption of the electrical supply, it will lose the data immediately, and for this it is known as “volatile” memory. Many microcontrollers rely on SRAM, which provides a very high speed of work with very low power consumption (compared to DRAM), but it occupies a large physical space, as one memory cell in its simplest form consists of 6 transistors compared to one transistor for DRAM cells Therefore, the size of these memories in the microcontroller is small and of the order of kilobytes.
ROM: This memory saves information in a way that ensures that it remains even in the event of a power outage. This information is the basic instructions that a microcontroller needs during its operation, in addition to another memory space dedicated to storing the code that is executed while the microcontroller is working. The most common type of ROM used in microcontrollers is Flash. In addition, the microcontrollers include EEPROM programmable storage units that can be used additionally to store and store other information.
Registers: In addition to random access memory and read-only memory, the processor within the microcontroller chip relies on a number of registrars dedicated to carrying out specific tasks while the program is running, and the most famous example of these special registrars is the program counter that stores the address of the next instruction that must be The processor has to implement them, and for clarity, we now know that the ROM preserves the code in the program that tells the processor what to do, but the processor does not know exactly where these instructions are located in the memory (specifically the "address" of the instructions), and the program counter function is Tell the processor the "address" of the instruction saved in the ROM so that it can go to it and then execute it.
System Bus: The bus is nothing but a physical connection wire between the different units that make up the microcontroller chip, and it ensures the transfer of data and commands from one place to another. There are three main buses: the Data-Bus, the Control-Bus, and the Address-Bus. Each of these types specializes in transmitting a specific type of data, so the address bus is tasked with fetching where the data and code are placed, while the data bus brings the data and information itself, and finally the control bus transmits specific commands, such as the processor sends a query request to read / write a specific part from the memory. Basically, the address bus capacity determines the maximum amount of RAM the processor can handle, or what is known as the "addressing space".
Input and Output I / O Pins: The input and output ports allow data and information to enter and to the processor within the microcontroller chip. These outlets are divided in the form of “Ports” where each gateway includes a specific number of Pins, and a specific recorder is assigned through which the nature of the gate can be controlled, whether it is the input or output and the type of electrical signals that can be received through this gate.
So here is the termination of the basic units and parts that are inside the microcontroller chip. In any case, microcontrollers include terminals and other units with specific tasks and functions, and the most popular of these terminals are:
Analog-Digital-Converter: The function of this unit is to convert the analog voltage signal that enters the microcontroller through one of its subdivisions into a digital encoder that can be handled by the controller.
Digital-Analog-Converter: This unit converts the digital data inside the microcontroller into an analog shape that represents the result of the processing performed. For example, the audio modification process requires first converting it into digital form (via the ADC unit) and then the processor modifying it according to the code saved in the ROM. In order to send and display the processed sound in a manner that is understandable to us, a digital-analog changer unit that can be linked with A suitable projector such as a loudspeaker.
Timers: Timers provide a method for generating specific periods of time used to know that an event has occurred during a time (such as measuring the number of heartbeats in a minute) or to know the time required to implement a specific command. In addition, timers are widely used in generating PWM signals that are used in a wide range of control applications, especially motor speed control.
Serial-interface communication units: There is a necessity in many applications to exchange information between the controller and other devices surrounding it (you may be another controller). For this reason, many serial communication standards have been designed and specific Pins are assigned to handle the process of data entry and output according to one of the standards Connection. The most common serial communication standards used in microcontrollers are UART, SPI, and I2C. Physically, one of the loops available within the microcontroller is used to create a serial communication channel, and all that is required is to configure the registrar responsible for these spurs to inform the processor that they will be used to create a communication channel according to one of the criteria.
As an example of the internal structure of a microcontroller that includes all the basic units in addition to some terminals, one can look at the famous architecture 8051, which includes a terminal for handling interruptions, in addition to two timers Timer0, Timer1 and finally a serial port that allows data exchange with other devices.
The microcontroller as a computer system
The question regarding the differences between the microcontroller and the microprocessor is one of the most frequently asked questions when talking about microcontrollers, and since we have previously answered this question in a detailed article, we will discuss in this paragraph another aspect that will help to understand the structure and purpose of microcontrollers.
In the introduction to the article we indicated a basic and important piece of information: in essence, a microcontroller is a very small computer! Yes, you read it correctly, and it may occur to you that we made a mistake in the introduction to the article when we mentioned that the microcontroller is an integrated circuit IC. In fact, this requires a bit of clarification, and we have to delve somewhat into the definition of a “computer system”.The word “computer” is used in daily life to refer to devices such as a laptop computer or a desktop computer, which include a group of units that ensure that this machine performs the tasks that we ask of it, while our use of the word “computer” to refer to these machines (i.e., laptops). And the desktop computer) is not wrong, except that it does not mean that they are the only machines and devices that we can call a "computer", or to be more precise, they are not the only technical devices that can be called a "computer system".
Let's take a deeper look at the computer itself, and try to analyze its basic structure and components through which it executes what we ask of it:
- A computer has a brain that performs all the operations for processing data, which is the central processing unit, or shortly, the processor.
- The computer has memories that store a lot of important and necessary information to ensure that it works as required, in addition to the presence of storage units that allow us to save the various information and data that the processor itself creates (pictures, videos, text files, music files).
- The computer has units that help us send data and information inside it, whether it is direct interactive tools (such as the keyboard, mouse, touch screens) or various communication tools (such as the USB serial data port, Ethernet port, HDMI high-definition multimedia port).
- Computers have units that help us see the output of data processing operations, such as a screen or amplifiers.
The previous brief presentation is a simple explanation of the principle of "computer system" and what are the functional units that must be present in any technical system in order to deal with it as a computer. You might think now that the previous presentation implicitly indicates that devices such as smartphones are computers, and if you think like this, congratulations, because this is true! From an abstract technical point of view, ignoring the differences related to operating systems and their characteristics, a smart phone is an integrated computer system that differs from a desktop or laptop computer by the way the user interacts with it and by the internal design of its basic units (such as processor and memory) that make it low energy consumption. It has a small physical size that allows it to be placed in a small device such as a mobile phone.
Returning to the microcontroller, as I indicated at the beginning it is an integrated electronic chip that includes within it a large number of functional units that perform various tasks that contribute to the result in the formation of a compact computer system on a small chip whose dimensions do not exceed the dimensions of the coin. More precisely, the microcontroller inside it includes a central processor, memory units, storage units, input and output units, and communication units. This integration of these functional units together is what justifies considering the microcontroller as a computer system.
Classifications and styles of microcontrollers
There are many types of micro-controllers today that differ from each other with the features and capabilities that they allow. Here we will focus on the most prominent features of microcontroller families that are used to classify them.
1. Processor Resolution
That is, the address bus capacity within the microcontroller chip, which determines the largest volume of data that can be exchanged when executing each code. An 8-bit, 16-bit or 32-bit microcontroller can be selected.
2. Memories
- External Memory Microcontrollers: This type of controller does not include all the functional units and peripherals needed by the controller, but it is located separately on the outside of the chip and communicates with it through the input and output units.
- Embedded Memory Microcontrollers: This type of controllers includes all the memories and functional units that the controller needs to carry out its work without the need to link it with any external memory or functional unit.
3. Memory Architecture
- Harvard Memory Architecture: With this type of controller, separate spaces are allocated for each of the program memory and data memory, allowing access to them at the same time by the processor.
- Princeton Memory Architecture (von Neumann): With this type of controller, a common space is allocated to program and data memory, which means that the processor will need more work cycles to implement the same instruction compared to Harvard architecture.
- RISC Architecture: Reduced Instruction Set Computing: With this type of controller, few simple instructions are used to implement different programs. For example, multiplication is performed by executing a series of instructions for addition, being the addition statement simpler than the multiplication statement. Reliance on implementing simple instructions contributes to reducing the number of transistors within the processing chip, which in turn contributes to reducing the energy consumption of the chip as a whole.
- CISC Architecture: Complex Instruction Set Computing: With this type of controller, complex instructions are used in order to execute different commands, and this means fewer instructions but with a more complex structure, which is translated physically by the necessity for the presence of more transistors within the processing chip, which in turn is reflected On power consumption that would be higher on the scale with the RISC architecture-based controller chips.
After learning about the different components of the microcontroller and its different types and how to distinguish between them, it is time to touch on another aspect related to it, which is how to use it in practical applications.
Let's take a simple example: a microcontroller temperature measuring circuit. To do this, we need a temperature sensor, a microcontroller, an electrical feed source and a display device such as an LCD. What we need is to connect the temperature sensor with one of the coils that perform the analog digital switching function to read the sensor output, then interpret the read value inside the controller, and finally display the numerical value of the temperature on the display screen.
Now, regardless of the electronic design of such a circuit, what matters to us is how to tell the controller what it needs to do the task of measuring the temperature. This process is actually "programming" the controller, which is currently done using high-level programming languages, mainly C and C ++ languages, through an IDE script editor, in addition to an electronic programmer that can transfer the source code from the computer to the microcontroller.
The microcontroller cannot understand high-level programming languages, and what it really needs is a binary source code because it is actually the only way in which a processor can deal with any type of information. Assembly Language was previously used widely in writing microcontroller programs as it is a low-level programming language and can be translated into binary very easily. With the development of high-level languages and the development of language compilers, the process of writing programs has become easier by using a language such as C, which has become today the most preferred language in the field of hardware programming due to the high speed it provides as well as the great capabilities that allow it to communicate with the hardware structure and employ it in the manner Occasion.
Returning to the temperature measurement circuit we want, the main function is now limited to writing a program in C language and then using a text editor to generate the source code that the controller can understand to carry out the task of measuring the temperature and then display its numerical value. This source code is a file written in the Hexadecimal encoding language that can be easily interpreted by the controller and converted into a binary language. These files have an .hex suffix to indicate the nature of the information they contain.
Despite the use of high-level languages in the programming of microcontrollers, it is worth saying that assembly language is still used, especially if the application needs precise control of how to interpret the code at the processor level. On the other hand, some new distributions began to appear for programming microcontrollers, such as the MicroPython distribution that relies on the famous Python grammar and compiler for programming microcontrollers.
Leading manufacturers of microcontrollers
Today, many companies manufacture micro-controller chips, and some companies rely on designing their own structures while many of them adopt structures designed by other companies, and the most prominent example of this is the ARM architecture that is designed and described by ARM Holdings and then licenses it to manufacturers. For chips to use in the manufacture of their controllers. There is a constant discussion among developers about the best families and architectures of micro-controllers, and perhaps the most famous of these discussions is the difference between PIC controllers and AVRs, which ended somewhat when PIC controller manufacturer Microchip acquired Atmel, the manufacturer of AVR controllers in 2016.
Today there is not a single company that dominates the market of micro-controllers, but competition takes a large form with the presence of many manufacturers in the market, and the most prominent of these names at the present time:
Dutch company NXP: NXP provides many families of microcontrollers working with 8, 16 and 32-bit resolutions that belong to different families. The Dutch company acquired FreeScale to become today one of the largest manufacturer of microcontroller chips in the world, and it relies on ARM's Cortex-M architecture in 32-bit controllers. To learn more: click here .
Renesas of Japan: The Japanese company provides microcontrollers within three main families: RL78 with 8 and 16-bit precision for low-energy applications, the RZ family with 32-bit precision for medium applications, enhanced power consumption, and finally, the RX family with 32-bit accuracy for high-performance applications. . To learn more: click here .
Microchip: one of the old names that has accompanied the development of microchip controllers since their inception. The company provides a wide range of microcontrollers that can be used in many applications, from 8-bit controllers to 32-bit, and it designs its own chip architectures in addition to relying on other architectures such as AVR and ARM. The company consolidated its presence and market share after the acquisition of Atmel in 2016. To learn more, click here .
German company Infineon: The German company provides microcontrollers ranging from 8-bit to 32-bit resolution, and they rely on ARM's Cortex-M architecture in 32-bit controllers (within the famous XMC family) as well as on their own architecture, which is Aurix for controller chips Small car industry. To learn more: click here .
STMicroelectronics (Italian-French): A relatively new company in the manufacture of micro-controllers, but it managed to achieve great success in a short period of time to become today one of the largest manufacturers. The company manufactures 8-bit controllers in the STM8 family and 32-bit controllers in the STM32 family based on ARM's Cortex-M architecture. To learn more: click here .
Texas Instruments of America: One of the big names with a long history in the electronic industry, especially semiconductors. Thanks to this company in the introduction of the first microcontroller, TMS1000 in 1974, and today it manufactures microcontrollers with 16 and 32-bit accuracy depending on a variety of structures, including their own structures such as MSP controllers or depending on the ARM architecture, and it also provides advanced controllers that contain it inside. On a digital signal processor DSP within the families based on ARM architecture. To learn more: click here .
The American Cypress Company: The company provides a large spectrum of families and architectures of micro-controllers with accuracy of 8, 16 and 32-bit, and is also specialized in designing programmable systems on a PSoC chip that includes inside a microcontroller and other functional units that help to carry out advanced and complex computer tasks. To learn more: click here .
American company Silicon Labs: manufactures 8-bit microcontrollers in the EFM8 family and manufactures 32-bit microcontrollers within the EFM32 family based on ARM's Cortex-M architectures. To learn more: click here .
The following list from the English Wikipedia Encyclopedia includes a list of all microcontroller manufacturers and their most prominent families: Click here .
summary
Micro-controllers play a large and important role in many applications and electronic devices used around us, and with the development of the technical industry and the increase in the number of smart devices and Internet of things applications, the dependence on the microcontrollers is increasing day by day because they provide adequate computing performance within a small size and low energy consumption. This article is an introductory introduction through which you can get a general idea of microcontrollers, their history, structure, most famous families and manufacturers for them, and we hope that it will be suitable as a first step for those who want to gain more access to this large technical world.
read also :
Comments
Post a Comment