A complete analysis of the five major microcontrollers - 51, AVR, PIC, MSP430, ARM

Publisher:xinyi9008Latest update time:2020-08-28 Source: elecfansKeywords:MCU  AVR  PIC  MSP430  ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

There are many single-chip microcomputer manufacturers today, and their products have different performances. Which model should we choose for specific situations? First, let's clarify two concepts: centralized instruction set (CISC) and reduced instruction set (RISC). The data line and instruction line of the single-chip microcomputer with CISC structure are time-sharing multiplexed, which is the so-called von Neumann structure. It has rich instructions and powerful functions, but instruction fetching and data fetching cannot be carried out at the same time, the speed is limited, and the price is also high. The data line and instruction line of the single-chip microcomputer with RISC structure are separated, which is the so-called Harvard structure. This allows instruction fetching and data fetching to be carried out at the same time, and because the general instruction line is wider than the data line, its instructions contain more processing information than similar CISC single-chip microcomputer instructions, and the execution efficiency is higher and the speed is also faster. At the same time, the instructions of this single-chip microcomputer are mostly single-byte, and the space utilization rate of the program memory is greatly improved, which is conducive to the realization of ultra-miniaturization.


8051

AVR and PIC are both 8-bit microcontrollers with different structures from 8051. Because of the different structures, the assembly instructions are also different. In addition, unlike 8051 which uses CISC instruction set, they all use RISC instruction set, with only dozens of instructions. Most of the instructions are single instruction cycle instructions, so at the same crystal frequency, they are faster than 8051. In addition, PIC's 8-bit microcontroller was the world's largest microcontroller in terms of shipments in the past few years, followed by Freescale's microcontroller. ARM is actually a 32-bit microcontroller. Its internal resources (registers and peripheral functions) are much more than 8051, PIC, and AVR, and are very close to the CPU chip of a computer. It is often used in mobile phones, routers, etc. DSP is actually a special microcontroller, which ranges from 8-bit to 32-bit. It is specially used to calculate digital signals. In some formula calculations, it is faster than the fastest CPU of current home computers. For example, a general 32-bit DSP can calculate a 32-bit number multiplied by a 32-bit number and then add a 32-bit number in one instruction cycle. Applicable to certain occasions with high requirements for real-time processing.

AVR

High reliability, powerful functionality, high speed, low power consumption and low price are also necessary conditions for microcontrollers to occupy the market and survive.


The early single-chip microcomputers were mainly due to the low level of technology and design, high power consumption and poor anti-interference performance, so a safe solution was adopted: using a higher frequency division coefficient to divide the clock, making the instruction cycle long and the execution speed slow. Although the later CMOS single-chip microcomputers adopted measures such as increasing the clock frequency and reducing the frequency division coefficient, this situation has not been completely changed (51 and 51 compatible). Although some reduced instruction set microcontrollers (RISC) have been introduced, they still follow the practice of clock division.


The introduction of AVR microcontrollers completely broke this old design pattern, abolished the machine cycle, abandoned the practice of complex instruction computers (CISC) to pursue complete instructions; adopted a reduced instruction set, using words as the unit of instruction length, and rich operands and operation codes are arranged in one word (most of the single-cycle instructions in the instruction set are like this), with a short instruction fetch cycle, and can pre-fetch instructions to achieve pipeline operation, so instructions can be executed at high speed. Of course, this speed jump is backed by high reliability.


The hardware structure of AVR microcontroller adopts a compromise strategy between 8-bit and 16-bit machines, that is, a local register storage stack (32 register files) and a single high-speed input/output solution (i.e., input capture register, output comparison match register and corresponding control logic). It improves the instruction execution speed (1Mips/MHz), overcomes the bottleneck phenomenon, and enhances the function; at the same time, it reduces the cost of peripheral management, relatively simplifies the hardware structure, and reduces the cost. Therefore, AVR microcontroller has achieved an optimized balance in software/hardware cost, speed, performance and cost, and is a cost-effective microcontroller.


To sum up, AVR has the following characteristics

●Harvard architecture, with 1MIPS/MHz high-speed processing capability;

● Ultra-functional Reduced Instruction Set (RISC), with 32 general-purpose working registers, overcomes the bottleneck phenomenon caused by the single ACC used in 8051 MCU;

●Fast access register group and single-cycle instruction system greatly optimize the size and execution efficiency of target code. Some models have very large FLASH, which is particularly suitable for development using high-level languages;

●When used as output, it is the same as PIC's HI/LOW, and can output 40mA (single output). When used as input, it can be set to a three-state high-impedance input or an input with a pull-up resistor, and has the ability to sink 10mA-20mA current;

● The chip integrates multiple frequency RC oscillators, power-on automatic reset, watchdog, startup delay and other functions, making the peripheral circuit simpler and the system more stable and reliable;

●Most AVR chips have rich on-chip resources: E2PROM, PWM, RTC, SPI, UART, TWI, ISP, AD, AnalogComparator, WDT, etc.;

● In addition to the ISP function, most AVRs also have an IAP function, which is convenient for upgrading or destroying applications. Selection of AVR series microcontrollers AVR microcontrollers are complete and can be applied to various occasions. AVR microcontrollers have 3 grades:

Low-end Tiny series AVR microcontrollers: mainly Tiny11/12/13/15/26/28, etc.; mid-range AT90S series AVR microcontrollers: mainly AT90S1200/2313/8515/8535, etc. (being phased out or transitioning to Mega) high-end ATmega series AVR microcontrollers: mainly ATmega8/16/32/64/128 (storage capacity is 8/16/32/64/128KB) and ATmega8515/8535, etc.


PIC

What are the advantages of PIC? Maybe you will have such questions, so I will briefly talk about my views here.

1) The biggest feature of PIC is that it does not simply pile up functions, but starts from reality, attaches importance to the performance and price ratio of products, and develops multiple models to meet the application requirements of different levels. In reality, different applications have different requirements for microcontroller functions and resources. For example, a motorcycle ignition needs a small microcontroller with fewer I/Os, less RAM and program storage space, and higher reliability. If a 40-pin and powerful microcontroller is used, the investment will be large and it will be inconvenient to use. The PIC series has dozens of models from low to high to meet various needs. Among them, the PIC12C508 microcontroller has only 8 pins and is the smallest microcontroller in the world.


This model has 512 bytes of ROM, 25 bytes of RAM, an 8-bit timer, an input line, and 5 I/O lines. The market price is 3-6 yuan. Such a single-chip microcomputer is undoubtedly very suitable for applications such as motorcycle ignition. The high-end model of PIC, such as PIC16C74 (not the highest-end model yet), has 40 pins, and its internal resources are 4K ROM, 192 bytes of RAM, 8-way A/D, 3 8-bit timers, 2 CCP modules, three serial ports, 1 parallel port, 11 interrupt sources, and 33 I/O pins. Such a model can be comparable to high-end models of other brands.


2) Streamlining instructions greatly improves execution efficiency. The PIC series 8-bit CMOS microcontroller has a unique RISC structure, a Harvard bus structure with separate data bus and instruction bus, which makes the instructions have a single word length and allows the number of bits of instruction code to be more than the number of bits of data. Compared with the traditional 8-bit microcontroller with CISC structure, it can achieve 2:1 code compression and increase the speed by 4 times.


3) Zero time to market: Using PIC's low-cost OTP chip allows the microcontroller to launch the product immediately after its application program is developed.


4) PIC has a superior development environment. The real-time performance of the OTP microcontroller development system is an important indicator. For example, most of the development systems of ordinary 51 microcontrollers use high-end models to simulate low-end models, and their real-time performance is not ideal. PIC launches the corresponding simulation chip at the same time as launching a new model. All development systems are supported by dedicated simulation chips, and the real-time performance is very good. In my personal experience, there has never been a case where the simulation results are different from the actual operation results.


5) Its pins have anti-transient capabilities and can be connected to a 220V AC power supply through a current-limiting resistor. They can be directly connected to a relay control circuit without the need for optocoupler isolation, which greatly facilitates the application.


6) Complete confidentiality. PIC uses a confidential fuse to protect the code. After the user burns the code in and blows the fuse, others can no longer read it unless the fuse is restored. Currently, PIC uses a deep-buried fuse process, and the possibility of restoring the fuse is extremely small.


7) Built-in watchdog timer can be used to improve the reliability of program operation.

[1] [2]
Keywords:MCU  AVR  PIC  MSP430  ARM Reference address:A complete analysis of the five major microcontrollers - 51, AVR, PIC, MSP430, ARM

Previous article:MSP430 vs. MSP432, who is the strongest?
Next article:STM8 study notes (II): GPIO input

Latest Microcontroller Articles
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号