中文

What's the difference between embedded and single-chip computers?

What is a Single Chip Microcomputer

First of all, the concept of MCU is clear. MCU is an integrated circuit chip. It uses VLSI technology to process CPU, RAM, ROM, multiple I/O ports, interrupt system, timer/counter and other functions with data processing capability (including display driver). Circuits, pulse width modulation circuits, analog multiplexer, A/D converter and other circuits are integrated into a single silicon chip to form a small and perfect microcomputer system, which is widely used in industrial control field.


From the 1980s, from the then 4-bit, 8-bit microcontroller, to the present 300 M high-speed microcontroller. For example, the most classic 51 series microcontroller, the appearance is only a thumb-sized cuboid chip, a total of 40 pins, which contains logical operation units. It's actually a CPU.


At the beginning of contacting MCU, there was a question why MCU was black and could not be any other color. Later, it was known that it was the limitation of MCU material.


For single-chip computer, in fact, one chip is all, other than the smallest system of single-chip computer is added for the normal operation of single-chip computer, such as crystal oscillator, 5V power supply, inductance and resistance. Of course, the smallest system can only ensure the normal operation of single-chip computer, and can hardly realize any application based on single-chip computer.


In order to realize the application of MCU, other peripherals must be added. For example, keys, led lights, led screens, buzzers, various sensors. This is also the MCU development board that many companies are doing on the market.


In summary, MCU is a single module to complete the functions of operation, logic control, communication and so on. That is to say, the real name of the single-chip computer is "single". The DSP chip can also be considered as a single chip computer. Of course, they are powerful, but their functions are still very single. In short, they deal with data and logic.


What is Embedded

So what is embedded? Generally speaking, embedded system refers to embedded system. The definition of embedded system by the IEEE (InsTItute of Electrical and Electronics Engineers) is "devices for controlling, monitoring or assisting the operation of machines and equipment".


Embedded system is a special computer system, as part of the device or equipment. Usually, an embedded system is an embedded processor control board whose control program is stored in ROM.


Embedded system is a system that connects application program, operating system and computer hardware. It refers to a special computer system that is application-centered, computer technology-based, software and hardware can be tailored. It aims at user applications that have special requirements for function, reliability, cost, volume, power consumption and usage environment. Unification.


In fact, all devices with digital interfaces, such as watches, microwave ovens, video recorders, automobiles and so on, use embedded systems. Some embedded systems also contain operating systems, but most embedded systems implement the whole control logic by a single program. This is because embedded systems are generally used in industrial control, that is to say, the control of peripherals is written to death, without manual intervention, but also to ensure the stability and reliability of the system.


We can often hear that the company's recruitment requirements are embedded software engineers or embedded hardware engineers, that is to say, embedded systems include software and hardware, in fact, think carefully can understand that they have run the system, of course, there are software and BSP hardware.


That is to say, embedded system is a combination of software and hardware. The widely accepted definition of embedded system in China is: application-centered, computer technology-based, software and hardware can be tailored to meet the strict requirements of application system on function, reliability, cost, volume, power consumption and other special computer systems.


Embedded Hardware Layer

The hardware layer includes embedded microprocessor, memory (SDRAM, ROM, Flash, etc.), general device interface and I/O interface (A/D, D/A, I/O, etc.). Adding power circuit, clock circuit and memory circuit on the basis of an embedded processor constitutes an embedded core control module. Operating systems and applications can be solidified in ROM.


The core is microprocessor. Embedded microprocessor is different from general CPU. Embedded microprocessor mostly works in specific designed systems, such as TI or Atmel, which have many processors with different locations. The SAM series of ATMEL are specially designed for the Internet of Things. AVR is widely used because of its outstanding performance. It is applied in industrial field.


Embedded microprocessors have different architectures. Even in the same system, they may have different clock frequencies and data bus widths, or integrate different peripherals and interfaces. According to incomplete statistics, there are more than 1000 kinds of embedded microprocessors in the world, and there are more than 30 series of architectures, among which the mainstream systems are ARM, MIPS, PowerPC, X86 and SH.


But unlike the global PC market, no embedded microprocessor can dominate the market. For 32-bit products alone, there are more than 100 embedded microprocessors. The choice of embedded microprocessor is decided by the specific application.


In the field of embedded system, it can be said that the processors of ARM architecture occupy half of the country, and ARM company has become a famous technology company, but it does not produce any processors, but only provides IP, which shows that the first-class companies do the standard. Other architectures are MIPS, sparc, PowerPC and so on.


For example, ARM has a variety of processor architectures, the most classic cortex series, which belongs to the ARMv7 architecture, which is the latest instruction set architecture of ARM until 2010. The architecture of ARMv7 defines three distinct series: "A" series for cutting-edge virtual memory-based operating systems and user applications; "R" series for real-time systems; and "M" series for microcontrollers.


Embedded system and external interaction require some form of general device interface, such as A/D, D/A, I/O, etc. The peripheral implements the input/output function of microprocessor by connecting with other devices or sensors outside the chip. Every peripheral usually has a single function, which can be built-in or out of the chip. There are many kinds of peripherals, ranging from a simple serial communication device to a very complex 802.11 wireless device.


Commonly used interface of general equipment in embedded system is A/D (analog/digital conversion interface), D/A (digital/analog conversion interface), I/O interface is RS-232 (serial communication interface), Ethernet (ethernet interface), USB (universal serial bus interface), audio interface, VGA video output interface, I2C (field bus), SPI (serial peripheral device interface). And IrDA (Infrared Interface) etc. This is actually similar to a single-chip computer.


Embedded Software Layer

That is, the operating system, including the kernel and file system, as well as more top-level applications. Embedded operating systems are generally Linux or other Unix-like, and there are some real-time operating systems (RTOS), such as VxWorks, RTEMS, ucOS, and so on.


Linux also includes different distribuTIons, such as Ubuntu, Redhat, Debian, centos, etc. They all use the Linux kernel. The difference is the software and tools above. Of course, there is no need to worry too much about standards. The software chosen by these Linux distributions is almost universal, such as Apac of Web Server. He, postfix of e-mail server, sendmail, Samba of file server, etc. In addition, there are standards such as Linux standard base to regulate developers. Unix-like is mainly FreeBSD and Solaris.


Real-time operating system is one of the most commonly used embedded systems. The core of real-time operating system is real-time. The essence of real-time operating system is the predictability of the time spent on task processing, that is, tasks need to be completed within a specified time limit. IEEE defines real-time systems as "systems whose correctness depends not only on the logical results of computation, but also on the time spent in generating the results".


Real-time operating system can be divided into hard real-time and soft real-time. Hard real-time requires that the operation must be completed within the specified time, which is guaranteed in the design of the operating system. Soft real-time only needs to complete the operation as quickly as possible according to the priority of the task. The operating system we usually use can be changed into a real-time operating system after a certain change.


The differences between real-time operating systems and time-sharing operating systems such as Linux are listed below.

(1) Multiplexing. Real-time information processing system is as multiplexing as time-sharing system. The system serves multiple end users according to the time-sharing principle, while the multiplexity of real-time control system is mainly manifested in the frequent collection of multi-channel field information and the control of multiple objects or multiple executing agencies.

(2) Independence. Real-time information processing system is as independent as time-sharing system. Each end user operates independently and does not interfere with each other when making service requests to the time-sharing system, while the collection of information and the control of objects in the real-time control system do not interfere with each other.

(3) Timeliness. The real-time requirement of real-time information system is similar to that of time-sharing system, which is determined by the waiting time acceptable to human beings; while the timeliness of real-time control system is determined by the starting and finishing deadlines required by the control object, generally in the second, 100 milliseconds to milliseconds or even in some cases. Less than 100 microseconds.

(4) Interaction. Real-time information processing system is interactive, but the interaction between human and system is limited to access some specific special service programs in the system. Unlike time-sharing system, it can provide data processing services and resource sharing services to end users.

(5) Reliability. Time-sharing systems require reliable systems, while real-time systems require highly reliable systems. Because any mistake can bring huge economic losses or even unpredictable catastrophic consequences. Therefore, in the real-time system, multi-level fault-tolerant measures are adopted to ensure the security of the system and data.


Because it is more reliable and timely. Embedded real-time operating system is more widely used in industrial control, aerospace, military and other fields, such as the Mars Explorer launched by NASA in recent years, which is RTEMS real-time operating system.


Embedded Intermediate Layer

The so-called middle layer is the interface layer between the software layer and the hardware layer. In fact, strictly speaking, it belongs to the software layer. Generally, developers call it BSP. This layer is mainly responsible for downward hardware driver, hardware configuration and other operations. Upward, it provides standard API to software developers. Developers who develop middle-tier are usually called embedded driver engineers.


It can also be seen from this that embedded design and hardware are inseparable. It is necessary to grasp the characteristics of the underlying hardware and how to drive its work, as well as to understand the relevant knowledge of the operating system, in order to write the application of the corresponding functions.


So to see whether an operating system supports a chip or a development board, just see if the source code contains the board-level support package of the corresponding chip or development board.


What hardware should an embedded system run on?

Speaking of embedded hardware or development board, I think the first impression of many people is Raspberry Pi, a microcomputer the size of a credit card. Despite its "petite" appearance, the "core" inside is very powerful. Video, audio and other functions are all available. It can be said that "sparrows are small, all organs are complete". After the introduction of raspberry pie, many manufacturers rushed to introduce similar products, such as banana pie.


There is TI's Beagleboneblack board, similar in size to raspberry pie. The peripherals include USB host and USB Mini as well as network card interface. There is also an SD slot and HDMI interface on the back. BBB processors use the most popular ARMv7 instruction set in embedded systems. Processors using instruction sets that are widely used today can be supported by more software. For example, some operating systems already do not support running on the ARMv6 instruction set. For example, Ubuntu abandoned support for the ARMv6 instruction set in April 2012.


Another advantage of ARMv7 over the ARMv6 instruction set is that the processors using ARMv7 perform better in practice. Compared with ARMv6, ARMv7 has many advantages, such as some significant improvements: realizing superscalar architecture, including SIMD operation instructions, and improving branch prediction algorithm, which greatly improves some performance.


summary

These are the performance parameters of a basic embedded core board. Compared with the performance parameters of the single chip computer mentioned above, the processing ability of the single chip computer is lower, the main frequency is mostly around tens of M, and the processing speed of the embedded core board is much different from that of hundreds of thousands of M. Besides, the single chip computer does not have a graphical interface. Processing ability, that is, the lack of GPU, makes it almost impossible for MCU to drive graphical interface.


The memory space of single chip computer and embedded processor is not a level. The memory of single chip computer is usually only a few kilograms in size. Because of the limitation of peripheral devices, it is impossible to increase the EMMC of peripheral devices in a large scale. The embedded processor usually has several hundred megabytes of RAM. Such a huge difference makes it almost impossible for single chip computer to resemble embedded devices. The processor can not run the operating system like that, even TCP/IP protocol stack and USB protocol stack. Some high-end single-chip computers, such as ST STM32 series, may run some lightweight system OS and embedded network protocol stack, such as IwIP protocol stack.


The rich and powerful performance of embedded processor determines that it can complete more applications that can not be completed by single chip computer, such as network communication function, video transmission processing function, etc. When the peripheral storage increases, embedded processor can easily run various Linux systems, as well as graphical GUI interface.

Copyright © 2019 Shenzhen Chengdian Electronics Co., Ltd. All rights reserved      Record No:Yue ICP No. 19087366     
Support:sztd