A brief analysis of the four major misunderstandings in the learning process of 51 single-chip microcomputer

Publisher:知者如渊Latest update time:2021-04-06 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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


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? I have reservations about this view. To get started with the 51 MCU, I must not only be familiar with the peripherals of the MCU, but also fully understand the meaning of a certain bit of the register. The configuration of the clock and timer must be well known. This will undoubtedly increase my learning difficulty and familiarity cycle. 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 specified bit of a register. In this way, my 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?


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!


Reference address:A brief analysis of the four major misunderstandings in the learning process of 51 single-chip microcomputer

Previous article:Development of Temperature Automatic Control System Based on CPLD
Next article:Centralized and accurate delay method in keil c51 programming

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号