First, “embedded” is a concept that lacks a precise definition, with various books providing their own interpretations. However, the main idea is the same: compared to general systems like PCs, embedded systems are specialized systems, structurally simplified, retaining only the necessary parts in hardware and software while discarding the unnecessary ones. Therefore, embedded systems generally possess characteristics such as portability, low power consumption, and single performance.
Then, MCU, DSP, and FPGA all belong to the category of embedded systems, tools used to achieve specific purposes.
MCU, commonly known as “microcontroller,” has developed significantly over the years, moving beyond just the Princeton architecture of the 51. Its performance has greatly improved. Since MCUs must execute programs sequentially, they are suitable for control applications, with extensive use in industry. ARM, originally a company specializing in MCU design, has captured a significant market share in recent years due to advanced technology and effective strategy. ARM’s microcontrollers come in many varieties, from low-end M0 (small appliances) to high-end A8, A9 (mobile phones, tablets), and do not necessarily require a system; it depends on the application scenario.
DSP stands for Digital Signal Processor, which differs from MCU in structure, accelerating computational speed and emphasizing computational capability. It can be seen as a super-fast MCU. Low-end DSPs, like the C2000 series, are mainly used in motor control, although TI seems to refer to them as DSC (Digital Signal Controller), a hybrid between MCU and DSP. High-end DSPs, such as the C5000/C6000 series, are generally used in video image processing and communication devices that require extensive computations.
FPGA, or Field Programmable Gate Array, has no inherent functionality, akin to a blank sheet of paper. Its capabilities depend entirely on the design by programmers (all processes are hardware, including VHDL and Verilog HDL programming, which are also considered hardware, typically referred to as writing “logic”). If you are skilled enough, you can transform it into an MCU or a DSP. While the internal structures of MCUs and DSPs are fixed, allowing only sequential processing through software programming, FPGAs can handle both parallel and sequential processing, making them 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, leading to significantly lower power consumption and cost compared to FPGAs when performing the same functions. Moreover, FPGA development is inherently complex, requiring considerable human and financial resources to achieve similar functionality. Thus, each of the three has its strengths and applications. However, there is a trend of integration among them; ARM’s M4 series has added a streamlined DSP core, TI’s Da Vinci series combines ARM and DSP structures, and new FPGAs from ALTERA and XILINX include ARM cores. Therefore, the relationship among the three is increasingly resembling three overlapping circles of primary colors.
In summary, “you have me, I have you.”
Where to Start Learning for Hardware Engineers?
Microcontroller: Typically used without an operating system for simple control, such as elevators, air conditioners, etc.
DSP: Used for complex calculations, such as discrete cosine transforms and fast Fourier transforms, commonly used in image processing in digital cameras and other devices.
ARM: A British chip design company that does not manufacture chips but sells intellectual property.
FPGA: Field Programmable Gate Array, circuit designs completed using hardware description languages (Verilog or VHDL) can be quickly programmed onto the FPGA for testing, representing a mainstream technology in modern IC design verification.
Embedded systems contrast with desktop computers, as they can be customized, vary in form, and may have constraints on size, power consumption, and cost, with high real-time requirements. Devices like oscilloscopes, mobile phones, tablets, fully automatic washing machines, routers, and digital cameras may not visibly exhibit the presence of desktop computers, but they all operate with one or more embedded systems.
Depending on the functional complexity of the object system and the complexity of computational processing, different choices are provided. For simple household appliance control embedded systems, a simple 8-bit microcontroller suffices, being cost-effective. For mobile phones and game consoles, 32-bit ARM and DSP chips are necessary. FPGA is a more hardware-oriented implementation method.
Thus, to become a hardware engineer through learning, one should start with microcontrollers and then progress to ARM and DSP.
A Detailed Introduction to the Seven Mainstream Microcontrollers on the Market
Microcontrollers are now ubiquitous and come in various types, making it challenging for developers to keep up. Their development has been rapid, evolving from 4-bit and 8-bit in the 1980s to various high-speed microcontrollers today. Manufacturers are competing in speed, memory, and functionality, leading to a wide array of representative microcontroller manufacturers: Atmel, TI, ST, MicroChip, ARM… and domestic company Hongjing’s STC microcontroller is also noteworthy.
Below, we present 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. Initially introduced by Intel, its typical structure and centralized management of dedicated registers for bus operations, along with numerous logical operations and a rich instruction system geared towards control, make it a classic, laying the foundation for the development of other microcontrollers.
The reasons the 51 microcontroller has become a classic and is easy to learn are as follows:
Features:
1. From internal hardware to software, there is a complete bit-oriented operating system known as a bit processor, processing bits instead of words or bytes. It can handle specific bits of certain special function registers, such as transferring, setting, clearing, and testing, as well as performing bitwise logical operations, making it very comprehensive and user-friendly.
2. A dual-function address range has been specially opened in the internal RAM area, providing great flexibility, which undoubtedly offers significant convenience to users.
3. Multiplication and division instructions make programming easier. Many 8-bit microcontrollers do not have multiplication capabilities, requiring a subroutine for multiplication, which is quite inconvenient.
Disadvantages:(Although it is a classic, its shortcomings are still evident)
1. Functions like AD and EEPROM need to be expanded, adding hardware and software burdens.
2. Although I/O pins are simple to use, they lack output capability at high levels, which is the biggest weakness of the 51 series microcontroller.
3. The operating speed is too slow, especially with dual data pointers; improvements could greatly facilitate programming.
4. The 51 microcontroller has poor protection capabilities, making it easy to damage the chip.
Application Range:
Currently, it is widely adopted in educational settings and scenarios with low performance requirements.
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, notable for its low power consumption and high speed. Assembly language is flexible, with many addressing modes, few instructions, and easy to learn. This is primarily due to its integration of various analog circuits, digital circuits, and microprocessors on a single chip, providing a “single-chip” solution.
Its rapid development and expanding application range primarily depend on the following features…
Features:
1. Powerful processing capability, adopting a Reduced Instruction Set Computing (RISC) architecture with a rich addressing scheme (7 types of source operand addressing, 4 types of destination operand addressing), a concise set of 27 core instructions, and a large number of analog instructions; numerous registers and internal data memory can participate in various calculations; efficient lookup table processing instructions; high processing speed, with a 125 ns instruction cycle driven by an 8MHz crystal. These features ensure the ability to compile efficient source programs.
2. In terms of processing speed, it can achieve a 125 ns instruction cycle when driven by an 8MHz crystal. The 16-bit data width, 125 ns instruction cycle, and multifunctional hardware multiplier (capable of performing multiply-accumulate) can implement certain algorithms for digital signal processing (such as FFT).
3. The ultra-low power consumption of the MSP430 microcontroller is due to its unique features in reducing chip power voltage and flexible, controllable operating clock. The power voltage is 1.8~3.6V, allowing it to operate under 1MHz clock conditions with a current of around 200~400uA; the lowest power consumption in clock shutdown mode is only 0.1uA.
Disadvantages:
1. Personally, I feel it is not easy to learn, unsuitable for beginners, and there is relatively little information available, requiring users to go to the official website.
2. It occupies a larger instruction space because it is a 16-bit microcontroller, with some instructions occupying up to 6 bytes. Although the program appears concise, its space usage is significantly larger compared to PIC microcontrollers.
Application Range:
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, we also mention the TMS series microcontroller, which is not mainstream. It is an 8-bit CMOS microcontroller launched by TI, featuring various storage modes and peripheral interface modes, suitable for complex real-time control scenarios. Although it is not as excellent as STM32 and not as prominent as MSP430, the TMS370C series microcontroller provides high-cost performance real-time system control through integrating advanced peripheral function modules and various chip memory configurations.
STM32 Microcontroller
The STM32 series microcontroller launched by ST is known among industry peers as a highly cost-effective series of microcontrollers, if not the most. Its functionality is incredibly powerful. It is based on the ARM Cortex-M core specifically designed for high-performance, low-cost, low-power embedded applications, equipped with top-notch peripherals: 1ÎĽs dual 12-bit ADC, 4 Mbit/s UART, 18 Mbit/s SPI, etc. It also performs well in terms of power consumption and integration, although it is slightly inferior to MSP430 in terms of power consumption. This does not diminish its popularity among engineers due to its simple structure, user-friendly tools, and powerful functionality.
Features:
1. Core:ARM 32-bit Cortex-M3 CPU, with a maximum operating frequency of 72MHz, 1.25 DMIPS/MHz, single-cycle multiplication, and hardware division.
2. Memory:On-chip integration of 32-512KB Flash memory and 6-64KB SRAM.
3. Clock, reset, and power management:2.0-3.6V power supply and I/O interface drive voltage. POR, PDR, and programmable voltage detectors (PVD). 4-16MHz crystal. Built-in calibrated 8MHz RC oscillation circuit. Internal 40 kHz RC oscillation circuit. PLL for CPU clock. Calibrated 32kHz crystal for RTC.
4. 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 microcontroller families in the current market. Its CPU adopts a RISC architecture, with 33, 35, and 58 instructions, belonging to a reduced instruction set, and employs a Harvard dual-bus structure for fast operation. This allows for parallel processing of program memory access and data memory access, achieving high efficiency as each instruction can be completed within one cycle. The PIC microcontroller’s popularity can be attributed to the following characteristics:
Characteristics:
1. It features low operating voltage, low power consumption, and strong driving capability. The I/O ports of the PIC series microcontrollers are bidirectional, with a CMOS complementary push-pull output circuit. The I/O pins have direction registers for setting input or output states, resolving the issue of high-level pins being both input and output in the 51 series.
2. 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-impedance state, providing considerable driving capability, with low-level current intake reaching 25mA and high-level output current reaching 20mA. Compared to the 51 series, this is a significant advantage.
3. It can directly drive seven-segment displays with a simple external circuit. Its A/D is 10-bit, meeting precision requirements. It also features in-system programming (ISP) capabilities.
Disadvantages:
Its special function registers (SFR) are not 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 simultaneously in four storage units, but programming often requires interaction with special registers, necessitating repeated selection of the corresponding storage unit, particularly for setting or clearing bits in the status register STATUS.
Data transfer and logical operations typically require the working register W (akin to the accumulator A in the 51 series), while the 51 series allows direct transfer between registers, making the bottleneck phenomenon in the PIC microcontroller more pronounced than in the 51 series, which programmers may find frustrating.
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 and implementing pipelining. AVR microcontroller instructions are word-based, with most being single-cycle instructions. A single cycle can execute the current instruction while simultaneously fetching the next one. Typically, clock frequencies range from 4 to 8MHz, resulting in the shortest instruction execution time of 250 to 125ns. The reasons for the recent popularity of AVR microcontrollers are as follows:
Characteristics:
1. The AVR series does not have a structure similar to accumulator A; it mainly uses registers R16 to 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, Y, Z) perform data pointer functions, allowing for post-increment or pre-decrement operations. In the 51 series, all logical operations must occur in A, while AVR allows operations between any two registers, eliminating the need for back-and-forth operations in A, making it superior to the 51 series.
2. The special registers of AVR are concentrated in the address range 00 to 3F, eliminating the need for the storage unit selection process required in PIC, making it more convenient to use than PIC. The internal RAM address range for AVR is 0 to 00DF (AT90S2313) and 0060 to 025F (AT90S8515, AT90S8535), which occupy data space addresses and are typically used for data storage, lacking the functionality of general-purpose registers. As programs grow complex, the general-purpose registers R0 to R31 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.
3. The I/O pins of AVR are similar to those of PIC, also featuring direction registers for controlling input or output states. In output mode, the high-level output current is around 10mA, while the low-level input current is 20mA. While this may not surpass PIC, it is still superior to the 51 series.
Disadvantages:
1. It lacks bitwise operations, controlling and judging related register bits only in byte form.
2. There are significant differences in the C language syntax between AVR and the 51 series, which can be challenging for those who have just begun learning the 51 microcontroller.
3. There are only 32 general-purpose registers (R0 to R31), with the first 16 registers (R0 to R15) unable to directly interact with immediate values, limiting their versatility. In contrast, all general-purpose registers in the 51 series (address 00 to 7FH) can directly interact with immediate values, clearly offering an advantage over AVR.
Most commonly used devices:ATUC64L3U, ATxmega64A1U, AT90S8515
STC Microcontroller
When mentioning STC microcontrollers, some might argue that STC can also be considered mainstream, and they might be criticized for it~~ We base this on the fact that it is relatively good among domestic microcontrollers. The STC microcontroller, produced by Hongjing, is a single clock/machine cycle microcontroller. In simple terms, the STC microcontroller is a hybrid of 51 and AVR. Some argue that AVR is a replacement for the 51 microcontroller, but significant differences exist in bit control and C language syntax between AVR and STC. The STC microcontroller effectively combines the advantages of both 51 and AVR: while it may not be as powerful as AVR, it generally possesses the functions available in AVR. Additionally, the STC microcontroller is based on the 51 core, providing significant convenience to engineers familiar with 51 microcontrollers, saving them time in learning AVR while retaining various AVR functionalities.
The STC microcontroller is a new generation of high-speed, low-power, and strong anti-interference 8051 microcontroller. The instruction set is fully compatible with traditional 8051, but it operates 8 to 12 times faster, with an internal MAX810 dedicated reset circuit integrated.4 channels of PWM, 8 channels of high-speed 10-bit A/D conversion, targeting motor control suppliers in high-interference environments, making it a new series of microcontrollers following the 51 microcontroller…
Features:
1. Downloading and burning programs via serial port is convenient and user-friendly, with plenty of learning materials and videos available. The most famous is likely the video by Teacher Du, which many interested in microcontrollers used as an entry point. It also features a wide voltage range: 5.5 to 3.8V, 2.4 to 3.8V, and low power consumption design: idle mode and power-down mode (can be awakened by external interrupts).
2. The STC microcontroller is relatively easy to program and debug in applications; it features 10-bit AD, internal EEPROM, and can operate at 1T/machine cycle speed, making it 8 to 12 times faster than traditional 51 microcontrollers, and is also cost-effective.
3. 4-channel capture/comparison units, the STC12C2052AD series features 2 channels and can also implement 4 timers or 4 external interrupts, with 2 hardware 16-bit timers, compatible with standard 8051 timers. The 4-channel PCA can also implement 4 additional timers, featuring a hardware watchdog, high-speed SPI communication port, full-duplex asynchronous serial port, and compatibility with standard 8051 serial ports, along with an advanced instruction set architecture, compatible with the standard 8051 instruction set.
PS: While the functions of the STC microcontroller may not be as powerful as AVR or STM32, and its price may not be as low as 51 or ST32, these factors are not crucial. What matters is that it is one of the more outstanding domestic microcontrollers, and we hope domestic microcontrollers can thrive…
Most commonly used devices:STC12C2052AD
Freescale Microcontroller
Mainly targeting S08 and S12 microcontrollers, Freescale microcontrollers are far from limited to these. The Freescale series microcontrollers adopt a Harvard architecture and pipelined instruction structure, demonstrating low cost and high performance across many fields. Their architecture saves significant time in product development. Additionally, Freescale provides various integrated modules and bus interfaces, allowing for flexible functions in different systems! The unique features of Freescale microcontrollers are as follows:
1. Full series:From low-end to high-end, from 8-bit to 32-bit, the full series is available, with the 8-bit/32-bit pin-compatible QE128 allowing direct migration from 8-bit to 32-bit, filling a gap in the industry’s 8/32-bit compatibility architecture.
2. Multiple system clock modules:Three modules, seven operating modes. Various clock source input options, with different MCUs having distinct clock generation mechanisms, including RC oscillators, external clocks or crystals, and internal clocks. Most CPUs can operate in FEI, FEE, FBI, FBILP, FBE, FBELP, and STOP modes.
3. Multiple communication module interfaces:Freescale microcontrollers almost universally integrate various communication interface modules: including serial communication interface modules (SCI), multi-master I2C bus modules, serial peripheral interface modules (SPI), MSCAN08 controller modules, and universal serial bus modules (USB/PS2).
4. More optional modules:Includes LCD driver modules, temperature sensors, ultra-high frequency transmission modules, synchronous processing modules, and MCUs with screen display modules (OSD). Some MCUs even feature ringing detection modules (RING) and dual-tone multi-frequency/tone generator (DMG) modules.
5. High reliability, strong anti-interference, and various pin counts and packaging options.
6. Low power consumption; while Freescale series microcontrollers may not be as low-powered as MSP430, they do feature static “wait” and “stop” modes, significantly reducing overall power consumption. Recent ultra-low power models are already comparable to MSP430!
Most commonly used devices:MC9S12G series
If one were to rank these microcontrollers, the 51 microcontroller would still be the first choice for those wanting to follow the crowd; if you seek high cost-performance, STM32 would be your ideal choice; if you desire ultra-low power, MSP430 will not disappoint; if you want to support domestic products, STC will excite you…
–END-
Leave a Comment
Your email address will not be published. Required fields are marked *