First of all, “embedded” is a concept without a precise definition; different books have their own definitions. However, the main idea is similar: compared to general systems like PCs, embedded systems are specialized systems with a simplified structure, retaining only the necessary parts in both hardware and software while cutting out the unnecessary parts. Therefore, embedded systems generally have characteristics such as portability, low power consumption, and specific performance.
Then, MCU, DSP, and FPGA all belong to the category of embedded systems and are tools used to achieve specific purposes.
MCU, commonly known as “microcontroller,” has developed significantly over the years and is no longer limited to the Princeton architecture of the 51 series; its performance has greatly improved. Since MCUs must execute programs sequentially, they are suitable for control applications and are widely used in industry. ARM was originally a company specializing in designing MCUs, and due to its advanced technology and appropriate strategies, it has captured a significant market share in the microcontroller market in recent years.
ARM microcontrollers come in many varieties, from low-end M0 (small appliances) to high-end A8, A9 (smartphones, tablets), and are quite popular. Therefore, ARM microcontrollers do not necessarily have to run an operating system; the key is the application scenario.
DSP stands for Digital Signal Processor, which has a different structure from MCU, accelerating computation speed and emphasizing computational capability. It can be seen as a super-fast MCU. Low-end DSPs, such as the C2000 series, are mainly used in motor control, although TI seems to refer to it as DSC (Digital Signal Controller), a device that lies between MCU and DSP. High-end DSPs, like the C5000/C6000 series, are generally used for video image processing and communication devices that require extensive computation.
FPGA stands for Field Programmable Gate Array, which does not have any inherent functions; it is like a blank sheet of paper, and its functionality depends entirely on the design by programmers (all processes are hardware, including VHDL and Verilog HDL programming, which are also considered hardware aspects, generally referred to as writing “logic”).
If you are skilled enough, you can turn it into an MCU or a DSP. Since the internal structures of MCU and DSP are designed, they can only perform sequential processing through software programming, while FPGA can handle both parallel and sequential processing, making it comparatively faster.
So why do MCU, DSP, and FPGA coexist? This is because the internal structures of MCU and DSP are meticulously designed by IC designers, and they consume much less power and cost significantly less than FPGA when accomplishing the same functions. Moreover, the development of FPGA itself is quite complex, requiring more manpower and financial resources to achieve the same functionality.
Thus, each of the three has its strengths and areas of application. However, there has been a trend of integration among the three; ARM’s M4 series has added a streamlined DSP core, TI’s DaVinci series is essentially an ARM + DSP structure, and the newly launched FPGAs from ALTERA and XILINX include ARM cores. Therefore, the relationship among the three is increasingly resembling the three circles of primary colors.
In summary, “You have me, I have you.”
Where to Start Learning for Hardware Engineers?
Microcontroller: Typically does not use an operating system and is used for simple controls, such as elevators, air conditioners, etc.
DSP: Used for complex calculations, such as Discrete Cosine Transform, Fast Fourier Transform, commonly used in image processing, and found in devices like digital cameras.
ARM: A UK chip design company that does not manufacture chips but sells intellectual property.
FPGA: Field Programmable Gate Array, circuit design completed with hardware description language (Verilog or VHDL) can be quickly programmed onto FPGA for testing, and is the mainstream technology for modern IC design verification.
Embedded systems are tailored compared to desktop computers, with diverse forms, and may have constraints on size, power consumption, and cost, with high real-time requirements. Devices such as oscilloscopes, smartphones, tablets, fully automatic washing machines, routers, and digital cameras may not visibly show the presence of desktop computers, but they all have one or more embedded systems at work.
Depending on the complexity of the functional requirements and computational processing, different choices are provided. For simple home appliance control embedded systems, using a simple 8-bit microcontroller is sufficient and cost-effective. For smartphones and game consoles, 32-bit ARM and DSP chips must be used. FPGA is a more hardware-oriented implementation method.
Therefore, to become a hardware engineer, one should start with microcontrollers and then learn ARM and DSP.
Detailed Introduction to the Seven Major Mainstream Microcontrollers on the Market
Microcontrollers are now ubiquitous, with a wide variety, making it overwhelming for developers, and their development has been rapid, evolving from 4-bit and 8-bit in the 1980s to various high-speed microcontrollers today.
Various manufacturers are competing in speed, memory, and functionality, leading to a significant emergence of representative microcontroller manufacturers: Atmel, TI, ST, MicroChip, ARM… Domestic manufacturer Hongjing’s STC microcontroller is also notable…
Below is a comparison of the advantages and disadvantages of the 51, MSP430, TMS, STM32, PIC, AVR, and STC microcontrollers and their functionalities…
51 Microcontroller
The most widely used 8-bit microcontroller is also the easiest for beginners to learn. It was first introduced by Intel, and due to its typical structure and centralized management of dedicated registers, along with numerous logical bit operation functions and a rich instruction system aimed at control, it is considered a classic and laid the foundation for the development of other microcontrollers.
The reasons why the 51 microcontroller has become a classic and is easy to learn include the following characteristics:
Features:
-
From internal hardware to software, there is a complete bit operation system known as a bit processor, where the processing object is bits rather than words or bytes. It can process specific bits of certain special function registers within the chip, such as transferring, setting, clearing, testing, etc., and can also perform logical operations on bits, making its functionality quite comprehensive and user-friendly.
-
Additionally, a dual-function address range is specially allocated in the internal RAM area, allowing for extremely flexible use; this feature undoubtedly provides great convenience to users.
-
Multiplication and division instructions bring convenience to programming. Many 8-bit microcontrollers lack multiplication functionality, requiring a subroutine for multiplication, which is quite inconvenient.
Disadvantages: (Although it is classic, its drawbacks are still quite obvious)
-
Functions such as AD and EEPROM need to rely on expansion, increasing the hardware and software burden.
-
Although I/O pins are easy to use, they have no output capability when at high level, which is the biggest weakness of the 51 series microcontroller.
-
Running speed is too slow, especially with dual data pointers; improvements here could greatly facilitate programming.
-
The 51 has poor protection capabilities and is easily damaged.
Application Scope:
Currently widely used in educational settings and scenarios where performance requirements are not high.
Most commonly used devices: 8051, 80C51
MSP430 Microcontroller
The MSP430 series microcontroller is a 16-bit ultra-low power mixed signal processor launched by Texas Instruments in 1996, known for its low power consumption and fast speed. Assembly language is quite flexible, with many addressing modes, few instructions, and easy to learn.
This is primarily due to its integration of many analog circuits, digital circuits, and microprocessors into a single chip to provide a “single-chip” solution. Its rapid development and expanding application scope are mainly attributed to the following characteristics…
Features:
-
Powerful processing capability, it adopts a Reduced Instruction Set Computer (RISC) architecture, with rich addressing modes (7 source operand addressing modes, 4 destination operand addressing modes), a concise 27-core instruction set, and a large number of analog instructions; a large number of registers and on-chip data memory can participate in various calculations; it also has efficient lookup table processing instructions and high processing speed, achieving a 125 ns instruction cycle under an 8MHz crystal drive. These features ensure the ability to compile high-efficiency source programs.
-
In terms of processing speed, it can achieve a 125 ns instruction cycle under an 8MHz crystal drive. The 16-bit data width, 125 ns instruction cycle, and multifunctional hardware multiplier (capable of performing multiplication and addition) can realize certain algorithms for digital signal processing (such as FFT, etc.).
-
Ultra-low power consumption is achieved because the MSP430 microcontroller has unique features in reducing the chip’s power supply voltage and flexible, controllable operating clock. The power supply voltage is 1.8~3.6V. Thus, under 1MHz clock conditions, the chip’s current will be around 200~400uA, with the lowest power consumption in clock shutdown mode being only 0.1uA.
Disadvantages:
-
Personally, I feel it is not easy to learn and is not suitable for beginners; there is also relatively little information available, requiring users to search the official website.
-
Instruction space is relatively large because it is a 16-bit microcontroller; programs are in word units, and some instructions can occupy as many as 6 bytes. Although the program appears simple, compared to PIC microcontrollers, it occupies much more space.
Application Scope:
More commonly used in low-power and ultra-low-power industrial applications.
Most commonly used devices: MSP430F series, MSP430G2 series, MSP430L09 series
TMS Microcontroller
Here, I would also like to mention the TMS series microcontroller, which, while not mainstream, is an 8-bit CMOS microcontroller launched by TI, featuring multiple storage modes and various peripheral interface modes, suitable for complex real-time control scenarios. Although not as excellent as STM32, nor as flashy as MSP430, the TMS370C series microcontroller provides high cost-effectiveness for real-time system control through the integration of advanced peripheral function modules and various chip memory configurations.
It also uses high-performance silicon gate CMOS EPROM and EEPROM technology. Low power consumption CMOS technology, wide operating temperature range, noise suppression, combined with high performance and rich on-chip peripheral functions, make the TMS370C series microcontroller applicable in automotive electronics, industrial motor control, computers, communications, and consumer electronics.
STM32 Microcontroller
Launched by ST, the STM32 series microcontroller is well-known in the industry for its high cost-performance ratio, with powerful functionality. It is based on the ARM Cortex-M core designed for high-performance, low-cost, low-power embedded applications.
It also features top-notch peripherals: a 1μs dual 12-bit ADC, 4 Mbps UART, 18 Mbps SPI, etc., and performs well in terms of power consumption and integration. Although it is slightly inferior to MSP430 in terms of power consumption, this does not affect its popularity among engineers due to its simple structure and easy-to-use tools, combined with its powerful functionality.
Features:
-
Core: Single-cycle multiplication and hardware division.
-
Memory: On-chip integration of 32-512KB Flash memory. 6-64KB SRAM memory.
-
Clock, reset, and power management: 2.0-3.6V power supply and I/O interface drive voltage. POR, PDR, and programmable voltage detector (PVD). 4-16MHz crystal oscillator. Internal 40 kHz RC oscillation circuit. PLL for CPU clock. Calibration for RTC with 32kHz crystal oscillator.
-
Debugging mode: Serial debugging (SWD) and JTAG interface. Up to 112 fast I/O ports, up to 11 timers, and up to 13 communication interfaces.
-
Most commonly used devices: STM32F103 series, STM32 L1 series, STM32W series.
PIC Microcontroller
The PIC microcontroller series is a product of Microchip Technology Inc., divided into three levels: basic, mid-range, and high-end, and is one of the fastest-growing microcontrollers in the current market share. The CPU adopts RISC architecture, with 33, 35, and 58 instructions, belonging to the reduced instruction set.
It also uses a Harvard dual-bus structure, allowing for fast operation, enabling parallel processing of program memory access and data memory access. This instruction pipeline structure completes two tasks in one cycle: executing instructions and fetching the next instruction from program memory, making it one of the reasons for its high efficiency. Additionally, the PIC microcontroller has become a hot choice for the following reasons:
Characteristics:
-
Features low operating voltage, low power consumption, and strong driving capability. The I/O ports of the PIC series microcontroller are bidirectional, and its output circuit is a CMOS complementary push-pull output circuit. The I/O pins have added direction registers to set input or output states, solving the issue of the 51 series I/O pins being both input and output when at high level.
-
When set to 1, it is in input state, and regardless of whether the pin is high or low, it presents a high-impedance state externally; when set to 0, it is in output state, and regardless of the pin’s level, it presents a low-resistance state, with considerable driving capability, drawing 25mA of current at low level and outputting 20mA at high level. This is a significant advantage compared to the 51 series.
-
It can directly drive seven-segment displays with a simple external circuit. Its A/D is 10 bits, meeting precision requirements. It has online debugging and programming (ISP) functionalities.
Disadvantages:
Its special function registers (SFR) are not all concentrated in a fixed address range (80~FFH) like the 51 series, but are scattered across four address ranges. Only five special registers PCL, STATUS, FSR, PCLATH, INTCON appear in four storage bodies simultaneously, but during programming, one must interact with these special registers, requiring repeated selection of the corresponding storage body, which means setting or clearing the sixth bit (RP1) and fifth bit (RP0) of the status register STATUS.
Data transfer and logical operations generally must be performed via the working register W (equivalent to accumulator A in the 51 series), while the 51 series allows direct transfer between registers, making the bottleneck phenomenon in the PIC microcontroller even more severe than in the 51 series, which programmers should be well aware of.
Most commonly used devices: PIC16F873, PIC16F877.
AVR Microcontroller
The AVR microcontroller is a relatively novel microcontroller launched by Atmel, characterized by high performance, high speed, and low power consumption. It eliminates machine cycles, using clock cycles as instruction cycles, implementing pipelined operations.
AVR microcontroller instructions are in word units, and most instructions are single-cycle instructions. The shortest instruction execution time is 250~125ns, typically using a clock frequency of 4~8MHz.
Characteristics:
-
The AVR series does not have a structure similar to accumulator A; it mainly uses registers R16~R31 to perform A’s functions. In AVR, there is no data pointer DPTR like in the 51 series; instead, three 16-bit registers X (composed of R26, R27), Y (composed of R28, R29), and Z (composed of R30, R31) complete the data pointer functions (equivalent to having three sets of DPTR).
Additionally, it can perform post-increment or pre-decrement operations, while in the 51 series, all logical operations must be performed in A; AVR allows operations between any two registers, eliminating the back-and-forth in A, making it superior to the 51 series.
-
The special registers of the AVR are concentrated in the address range 00~3F, eliminating the need to first select storage bodies like in PIC, making it more convenient to use than PIC. The address range of on-chip RAM for AVR is 0~00DF (AT90S2313) and 0060~025F (AT90S8515, AT90S8535), occupying the address space of data, and this on-chip RAM is merely used for data storage and typically does not possess general-purpose register functionality.
When programs become complex, the general-purpose registers R0~R31 can become insufficient; in contrast, the 51 series has as many as 128 general-purpose registers (four times that of AVR), so programmers do not experience this limitation.
-
The I/O pins of AVR are similar to PIC; it also has direction registers to control input or output. In output state, the current output at high level is around 10mA, while low level draws 20mA. Although this is not as good as PIC, it is still superior to the 51 series.
Disadvantages:
-
There is no bit operation; all controls and judgments of related register bits are done in byte form.
-
C language syntax differs significantly from that of the 51 language, which can be quite uncomfortable for those starting with 51 microcontrollers.
-
There are only 32 general-purpose registers (R0~R31), and the first 16 registers (R0~R15) cannot directly interact with immediate values, leading to decreased versatility. In contrast, all general-purpose registers in the 51 series (address 00~7FH) can directly interact with immediate values, making it clearly superior to the former.
Most commonly used devices: ATUC64L3U, ATxmega64A1U, AT90S8515.
STC Microcontroller
When it comes to STC microcontrollers, some might say that STC is mainstream, and they might be criticized~~ We base this on the fact that it is a relatively good microcontroller domestically.
STC microcontroller is a single-clock/machine-cycle microcontroller produced by Hongjing. In simple terms, the STC microcontroller is a combination of 51 and AVR. Some say that AVR is a replacement for the 51 microcontroller, but there are significant differences in bit control and C language syntax. The STC microcontroller combines the advantages of both the 51 and AVR; although its functionality is not as strong as AVR, it generally has all the features found in AVR, while being based on the 51 core, providing great convenience for engineers familiar with the 51 microcontroller, saving the time required to learn AVR while retaining various AVR functionalities…
STC microcontroller is a new generation of high-speed, low-power, and strong anti-interference 8051 microcontroller, with instruction code fully compatible with traditional 8051, but 8~12 times faster, internally integrating MAX810 dedicated reset circuit. It features 4-channel PWM, 8-channel high-speed 10-bit A/D conversion, targeting motor control in high-interference environments, making it a new series of microcontrollers following the 51 microcontroller…
Features:
-
Downloading and programming via serial port is convenient and user-friendly, with abundant learning resources and videos available; the most famous is the video by Teacher Du, through which many friends interested in microcontrollers have started their journey. It also features a wide voltage range: 5.5~3.8V, 2.4~3.8V, and low power consumption design: idle mode, power-down mode (can be awakened by external interrupts).
-
STC microcontrollers are relatively easy to program and debug; they come with 10-bit A/D, internal EEPROM, and can operate under 1T/machine cycle, being 8~12 times faster than traditional 51 microcontrollers, and are also cost-effective.
-
STC12C2052AD series is dual-channel and can also implement 4 timers or 4 external interrupts, with 2 hardware 16-bit timers, compatible with ordinary 8051 timers. The 4-channel PCA can also implement 4 timers, featuring a hardware watchdog, high-speed SPI communication port, full-duplex asynchronous serial port, and compatibility with ordinary 8051 serial ports, while also having an advanced instruction set structure compatible with the ordinary 8051 instruction set.
PS: Although the STC microcontroller’s functionality is not as powerful as that of AVR or STM32, and its price is not as low as that of 51 or STM32, these do not matter much. What matters is that this is a relatively outstanding domestic microcontroller, and I hope domestic microcontrollers can have a bright future…
Most commonly used devices: STC12C2052AD.
Freescale Microcontroller
Mainly targeting S08 and S12 microcontrollers, of course, Freescale microcontrollers are far from limited to this. The Freescale series microcontrollers adopt Harvard architecture and pipelined instruction structure, demonstrating low cost and high performance in many fields, saving significant time in product development. Additionally, Freescale provides various integrated modules and bus interfaces, allowing for greater flexibility in different systems! The unique features of Freescale microcontrollers include:
-
Full series: From low-end to high-end, from 8-bit to 32-bit, with the introduction of the 8-bit/32-bit pin-compatible QE128, allowing direct migration from 8-bit to 32-bit, filling a gap in the industry regarding 8/32-bit compatible architectures.
-
Multiple system clock modules: Three modules, seven operating modes. Various clock source input options, with different MCUs having different clock generation mechanisms, which can be RC oscillators, external clocks, or crystals, and most CPUs can have all three modules! They can operate in seven modes: FEI, FEE, FBI, FBILP, FBE, FBELP, STOP.
-
Various communication module interfaces: Freescale microcontrollers almost integrate various communication interface modules internally, including Serial Communication Interface Module (SCI), Multi-master I2C Bus Module, Serial Peripheral Interface Module (SPI), MSCAN08 Controller Module, and General Serial Bus Module (USB/PS2).
-
More optional modules: LCD driver module, temperature sensor, ultra-high-frequency transmission module, synchronous processing module, and some MCUs with screen display modules (OSD), as well as some with ringing detection modules (RING) and dual-tone multi-frequency/tone generator (DMG) modules.
-
High reliability and strong anti-interference, with various pin counts and packaging options.
-
Low power consumption; while the power consumption of Freescale microcontrollers may not be as low as that of MSP430, it features fully static “wait” and “stop” modes, significantly reducing overall power consumption! Recently launched ultra-low power models are comparable to MSP430!
Most commonly used devices: MC9S12G series.
If we really had to rank these microcontrollers, then if you want to follow the mainstream, the 51 microcontroller is still the first choice; if you pursue high cost-performance, STM32 will be your ideal choice; if you desire ultra-low power consumption, MSP430 will surely not disappoint you; and if you wish to support domestic products, STC will excite you…
There are numerous groups related to the automotive industry, including complete vehicles, automotive semiconductors, key components, new energy vehicles, intelligent connected vehicles, aftermarket, automotive investment, autonomous driving, vehicle networking, etc. To join, please scan the administrator’s WeChat (please indicate your company name) There is also a startup financing group; welcome angel round and A-round companies to join;