Say goodbye to 51 single chip microcomputer

Publisher:bonbonoLatest update time:2014-10-23 Source: 21ic Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Recently, when I visited a forum, I saw many people discussing 51 single-chip microcomputers. Some people said that 51 single-chip microcomputers should be learned because they are the foundation; others said that 51 single-chip microcomputers are outdated products and are no longer used in product applications, so there is no need to learn them. I started from learning 51 single-chip microcomputers, and now I basically use 32-bit MCUs to do projects after working for many years. I think it is time to say goodbye to 51 single-chip microcomputers.

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. Taking STMicroelectronics' STM32F series microcontrollers as an example, STMicroelectronics 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 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 hardware operation mode 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); //Implement the initialization of 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 development difficulty cost. The 51 MCU does not support online debugging. Some problems are not found in the early stage of programming and 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 easily 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 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:Say goodbye to 51 single chip microcomputer

Previous article:MCU data communication simulation IIC communication
Next article:Research on Scheduling Jitter in CNC System Based on MIPS Processor and RTAI

Recommended ReadingLatest update time:2024-11-16 13:59

Ultrasonic module ranging 51 program _ single chip ultrasonic ranging c language
Ultrasonic Testing Principle Ultrasonic ranging program flow chart The procedure is as follows: //Ultrasonic module program //Ultrasonic module program //Trig = P2^0 //Echo = P3^2 #include #define uchar unsigned char #define uint unsigned int // void delay(uint z) { uint x,y; for(x=z;x 0;x--) for(y=110;y 0;y--); }
[Microcontroller]
Ultrasonic module ranging 51 program _ single chip ultrasonic ranging c language
51 MCU Learning Notes——4. Two buttons control the LED light
Two buttons to control the LED program: /*  * @Author: Wang Yunlong  * @Date:   2020-02-23 12:48:51  * @Last Modified by: Wang Yunlong  * @Last Modified time: 2020-02-23 15:37:24  */ #include reg52.h #define LED P0; //Set LED pin sbit KEY1 = P3^4; //Set key 1 pin sbit KEY2 = P3^5; //Set key 2 pin void LightLed1();
[Microcontroller]
Choose ARM processor, ARM7 or Cortex-M3
To use a low-cost 32-bit processor, developers face two choices: processors based on the Cortex-M3 core or the ARM7TDMI core. How to make a choice? What are the selection criteria? This article mainly introduces some characteristics of the ARM Cortex-M3 core microcontroller that are different from the ARM7 to help you
[Microcontroller]
DC motor drive based on 51 single chip microcomputer (L298)
L298 is a product of SGS. L298N is a 15-pixel monolithic integrated circuit with high voltage, high current and four-channel drive. L298N is designed to receive DTL or TTL logic levels, drive inductive loads (such as relays, DC and stepper motors) and switch power transistors. It contains a 4-channel logic drive circui
[Microcontroller]
Methods of expanding serial ports of 51 single chip microcomputer
The basic 51 microcontroller has four parallel ports, which also includes a serial port. When there are not enough interfaces, people will think of using external chips for expansion. However, although various textbooks, reference books, and online articles introduce many ways to expand the parallel port, almost n
[Microcontroller]
Methods of expanding serial ports of 51 single chip microcomputer
8051/2 MCU basics LED flashing, buzzer, digital tube driver, independent button, interrupt, timer interrupt, serial communication
The road from software to hardware is always difficult. I have been learning various circuit knowledge for more than three months, and now I have finally got the hang of it. AT 8051/2 1. Drive LED to flash 2. Drive the buzzer to sound 3. Drive common anode, single digital tube, 0-9 change (MPX1-CA) - use 8 resistors
[Microcontroller]
8051/2 MCU basics LED flashing, buzzer, digital tube driver, independent button, interrupt, timer interrupt, serial communication
51 microcontroller development and implementation of perpetual calendar system (alarm clock, stopwatch function)
First let me talk about the things I used. In terms of hardware (the circuits are all soldered by myself using a universal board): a 51 microcontroller, a 12864 LCD, a ds1302 clock chip, and four buttons. There are also some capacitors, resistors, crystal oscillators, etc. We will talk about them later. That’s all the
[Microcontroller]
51 microcontroller development and implementation of perpetual calendar system (alarm clock, stopwatch function)
Single chip microcomputer C8051F020 and its application in instruments and meters
1 Introduction At present, with the continuous improvement of science and technology and the level of industrial and agricultural production, higher and higher requirements are put forward for the corresponding instruments and meters. Therefore, instruments and meters need to expand a large number of peripheral func
[Microcontroller]
Single chip microcomputer C8051F020 and its application in instruments and meters
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号