When we studied microcontroller courses at the undergraduate level, the school and teachers generally asked us to start with the 51 microcontroller. When visiting technical forums related to electronics, I always see many friends discussing the 51 microcontroller. Some say that the 51 microcontroller should be learned because it is the foundation (the same as what the school does); others say that the 51 microcontroller is an outdated product and is no longer used in product applications, so there is no need to learn it. I started with the initial 51 microcontroller, and after working for many years, I now basically use 32-bit MCUs for projects. I think it's time to say goodbye to the 51 microcontroller.
The glorious past of 51 single chip microcomputer
51 single-chip microcomputer refers to MCS-51 series single-chip microcomputer, CICS instruction set. Developed by Intel, its structure adds instructions such as multiplication (MUL), division (DIV), subtraction (SUBB), comparison (CMP), 16-bit data pointer, Boolean algebra operations, as well as serial communication capabilities and 5 interrupt sources, with 128 RAM units and 4K ROM. Its representative model is ATMEL's AT89 series, which is widely used in industrial measurement and control systems. At present, the domestic 51 single-chip microcomputer market is mainly dominated by the domestic Hongjing product STC series, which is known for its low power consumption, stability and low cost.
Misunderstandings in Learning 51 Single Chip Microcomputer
Myth 1: 51 MCU is the basis of learning
The statement "51 single-chip microcomputer is the foundation of learning" is not wrong in itself. When I was an undergraduate, it was undoubtedly the foundation of learning - after all, there were no more advanced single-chip microcomputers available at that time, and there were no more advanced textbooks for reference in China. The level of teachers was also uneven, and the 51 single-chip microcomputer met such needs. Not only did it have a large number of established textbooks and extensive examples, but the actual projects at work at that time were also mainly 51 single-chip microcomputers. Therefore, the 51 single-chip microcomputer naturally became the basis of learning at that time. You should know that when I was an undergraduate in 2004, it was 10 years ago. According to Moore's Law, the electronics industry is updated every 18 months, and the technology 10 years ago has now been updated 6 generations - this is indeed the case.
At present, various tutorials for 32-bit Crtex-M series microcontrollers have become popular, and the difficulty of learning them is constantly decreasing. For example, STMicroelectronics' STM32F series microcontrollers gave away a large number of core boards in the early stage of product promotion. The free core board not only has the popular 32-bit Cortex-M series microprocessor, but also integrates an online debugger on the board. The CD or link that comes with it provides a large number of sample source codes. We only need to install the development environment to directly compile and download the debugging. At this time, it is definitely inappropriate to say that the 51 microcontroller is the basis for learning embedded systems.
Myth 2: 51 MCU can learn register operations
There is no doubt that the 51 MCU can learn to operate registers. Let's analyze the deeper reasons. In the programming environment of the MSC-51 MCU, assembly language was initially used as the main programming language. You should know that assembly language directly operates registers, and assembly language cannot do function calls and encapsulation like C language. If the 51 MCU's advantage is to operate registers, I think it should be said that the 51 MCU's operation of registers is a kind of helplessness, and it is a multiple-choice question with only one option.
Is it impossible to learn registers in our current Cortex-M series microcontrollers? Obviously not. In hardware design, the operation mode of hardware is the operation of registers, but its implementation can be different. The C language library function package provided by each microprocessor is actually the encapsulation of the instructions for operating registers in the C language environment. Here we use the ST official library function to give an example:
void USART_Init (USART1, *USART_InitStruct); //Initialize serial port 1, simple and clear, no comments required
I would also like to give an example here to illustrate the steps of register operation, but register operation is too complicated and I don’t want to waste time sorting it out.
The easy-to-understand C language, the easy-to-port C language, and the compiler corresponding to the hardware platform can complete the hardware operation. With a simple and convenient way, why should we consider the cumbersome and complicated assembly language and register operation?
Myth 3: The cost of 51 MCU is low
Cost is the main factor affecting application. The main consideration for project establishment is cost, and the main consideration for sales pricing is cost. Only low-cost solutions will have an advantage in the market. However, is the 51 microcontroller really the lowest cost? No. Now according to the functional classification, the cost of some Cortex-m0 series 32-bit microcontrollers can also be 3 yuan. Its performance is several times that of the 51 microcontroller, and it is easier to develop and maintain.
There is another cost: the cost of development difficulty. The 51 single-chip microcomputer does not support online debugging. Some problems are not found in the early stage of programming, and they will only appear after connecting to the hardware, such as the delay often used in control operations. At this time, the huge advantage of online debugging is reflected. It can extremely conveniently view the current state of the microprocessor, making the analysis of the problem simple and transparent. Thus, the difficulty of development is effectively reduced, the development cycle is shortened, and development funds are saved.
Myth 4: Getting started with 51 MCU is easy
Is it easy to get started with the 51 MCU? The author has reservations about this view. To get started with the 51 MCU, you must not only be familiar with the peripherals of the MCU, but also fully understand the meaning of a certain bit of the register. You must be familiar with the configuration of the clock and timer. This will undoubtedly increase the difficulty of learning and the familiarity period. If we use the library function mode of the 32-bit MCU, we only need to have knowledge of the C language, understand the API function, and directly look at the meaning of the annotated registers. There is no need to understand its underlying hardware implementation, let alone the meaning of a certain bit of a register. In this way, the workload is reduced, thereby reducing the difficulty of development. Do you think it is easier to get started with the 51 MCU or the 32-bit Cortex core microprocessor?
Summarize
Learning embedded systems is a very boring and challenging thing. Because it is directly connected to the actual hardware, we must not only consider the correctness of the programming, but also the reliability of the hardware. At this time, simple and efficient software writing will indirectly reduce our development difficulty and risk. The 51 single-chip microcomputer is already a thing of the past, and looking forward is the development. It's time to say goodbye to the 51 single-chip microcomputer!
Previous article:51 MCU read and write 2G SD card program
Next article:Microcontroller Design Tips: How to Implement 8051 Modular Programming
Recommended ReadingLatest update time:2024-11-16 11:40
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- EEWORLD University Hall----Analog Integrated Circuit Design (Li Zhangquan, Shanghai Jiaotong University)
- Repair a weird HC-SR04
- Request a free ZVS buck-boost evaluation board!
- bq30z50/55 senc file export configuration process
- Three-cell lithium battery charging management IC-VAS5176 charging current test
- USB TYPE C interface problem urgent help
- Notice on the extension of ON Semiconductor and Avnet IoT Innovation Design Competition
- Can't find header file when compiling
- RTC timekeeping function + GPIO control LCD12864 display
- On-chip memory resources of RSL10