Analysis of the advantages and disadvantages of embedded microcontrollers in the 51 series

Publisher:csw520Latest update time:2023-08-21 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The 51 series is the most widely used microcontroller. Due to its reasonable hardware structure, standardized instruction system, and "long" production history, it has the advantage of being the first to come first. Many well-known chip companies in the world have purchased the core patented technology of the 51 chip and expanded its performance based on it, further improving the chip and forming a huge system that is still being renovated to this day. The world of microcontrollers is abuzz.


Another advantage of the 51 series is the multiplication and division instructions, which also bring convenience to programming. The division instruction of dividing eight bits by eight bits has a quotient of eight bits, which is not accurate enough and is not used much. As for the multiplication instruction of eight bits by eight bits, the product is sixteen bits, the accuracy can still meet the requirements, and it is used more often. When doing multiplication, only one instruction is needed. Many eight-bit microcontrollers do not have the multiplication function. When doing multiplication, you have to write a subroutine call, which is very inconvenient.


The I/O pins of the 51 series are very simple to set up and use, but they have no output capability when the level is high, which can be said to have advantages and disadvantages. Therefore, other series of microcontrollers (such as PIC series, AVR series, etc.) have improved the I/O port and added a direction register to determine input or output, but the use has also become complicated.


At the same time, the original 51 series also has many areas worthy of improvement, such as too slow running speed. When the crystal oscillator frequency is 12MHz, the machine cycle reaches 1μs, which obviously cannot meet the needs of modern high-speed operation. The product models produced by Winbond are W77 series and W78 series. The W78 series is fully compatible with the AT89C series. The W77 series is an enhanced version, which has improved the timing of the original 8051. Each machine cycle is changed from 12 clock cycles to 4 cycles, which triples the speed. At the same time, the crystal oscillator frequency can reach up to 40MHz. The W77 series also adds watchdog WatchDog, two sets of uARTs, two sets of DVTR data pointers, ISP and other functions.


The PIC microcontroller CPU adopts a RISC structure, with 33, 35, and 58 instructions (depending on the level of the microcontroller), and is a reduced instruction set. The 51 series has 111 instructions and the AVR microcontroller has 118 instructions, both of which are more complex than the former. It adopts the Haryard dual bus structure and has fast running speed (instruction cycle is about 160~200nS). It can enable parallel processing of program memory access and data memory access. This instruction pipeline structure completes two parts of the work in one cycle. One is To execute instructions, the second is to fetch the next instruction from the program memory, so that in general each instruction only takes one cycle (except for a few), which is also one of the reasons for high-efficiency operation. In addition, it also has the characteristics of low operating voltage, low power consumption, and strong driving capability.


The special registers of this series of microcontrollers are not concentrated in a fixed address range (80~FFH) like the 51 series, but are scattered in four address ranges, namely memory bank 0 (Bank0: 00-7FH), Bank 1 (Bankl: 80-FFH), Bank 2 (Bank2: 100-17FH), Bank 3 (Bank3: 180-1FFH). Only 5 special registers PCL, STATUS, FSR, PCLATH, and INTCON appear in 4 memory bodies at the same time.


During the programming process, it is inevitable to deal with special registers and repeatedly select the corresponding memory bank, that is, set or clear bit 6 (RPl) and bit 5 (RPO) of the status register STATUS. This brings some trouble to programming. For the above-mentioned microcontroller, its bit instruction operations are usually limited to the memory bank 0 interval (00~7FH). Data transmission and logical operations basically have to be carried out through the working register w (equivalent to the accumulator A of the 5l series), and the 51 series can also be directly transmitted to each other through registers (such as: MOV30H, 20H; register 20H The content is directly transferred to register 30H), so the bottleneck phenomenon of PIC microcontroller is more serious than that of 51 series, which is very noticeable in programming.


Bus structure: The bus structure of the MCS-51 microcontroller is a von Neumann type. The computer fetches instructions and data in the same storage space, and the two cannot be performed at the same time; while the bus structure of the PIC microcontroller is a Harvard structure, and the instruction and data spaces are Completely separated, one for instructions and one for data. Since the program and data can be accessed at the same time, the data throughput rate is improved. Because the Harvard dual-bus structure is used in the PIC microcontroller, one thing that is different from common microcontrollers is that the program and data buses can use different widths. The data buses are all 8-bit, but the instruction bus digits are 12, 14, and 16 bits respectively.


Pipeline structure: The instruction fetching and execution of the MCS-51 microcontroller adopts a single instruction pipeline structure, that is, fetching one instruction and then fetching the next instruction after execution; while the instruction fetching and execution of the PIC adopts a dual instruction pipeline structure. When an instruction is executed When, the next instruction is allowed to be fetched at the same time, thus realizing a single-cycle instruction. Register group: All registers of the PIC microcontroller, including I/O ports, timers and program counters, etc., adopt the RAM structure, and only require one instruction cycle to complete access and operation; while the MCS-51 microcontroller requires two or It takes more than two cycles to change the contents of the register.


The remarkable features of AVR microcontroller are high performance, high speed and low power consumption. It cancels the machine cycle, uses the clock cycle as the instruction cycle, and implements pipeline operations. AVR microcontroller instructions are in word units, and most instructions are single-cycle instructions. In a single cycle, this instruction function can be executed and the reading of the next instruction can be completed at the same time. There are a total of 32 general-purpose registers (RO-R31). The first 16 registers (R0~R15) cannot directly deal with immediate data, so the versatility is reduced. In the 5l series, all its general-purpose registers (addresses 00-7FH) can directly deal with immediate data, which is obviously better than the former.


The AVR series does not have a structure similar to the accumulator A. It mainly implements the function of A through the R16~R31 registers. In the AVR, there is no data pointer DPTR like the 5l series, but three 16-bit registers: It completes the function of the data pointer (equivalent to three sets of DPTR), and can also perform post-increment or first-decrement operations. In the 51 series, all logical operations must be performed in A; but AVR can be performed between any two registers, eliminating the need to go back and forth in A. These are better than the 51 series.


Reference address:Analysis of the advantages and disadvantages of embedded microcontrollers in the 51 series

Previous article:Design of digital voltmeter based on ADC0809 and AT89S52 microcontroller
Next article:Detailed explanation of multi-digit LED display hardware circuit design

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

New Energy Vehicle Water Pump Solution Based on Infineon MOTIX™ Embedded Power ICs
With the improvement of automobile electrification, the progress of automatic driving and intelligence, the application of motors in cars will increase, and the types and drives of motors are also changing. Traditional mechanical drive or motor relay control is shifting towards PWM (pulse width modulation) speed reg
[Embedded]
New Energy Vehicle Water Pump Solution Based on Infineon MOTIX™ Embedded Power ICs
Recommended Content
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号