Performance comparison between 51 series and several common single-chip microcomputers

The microcontroller was born in the late 1970s and it refers to a complete computer system integrated on a single chip. It includes CPU, memory, internal and external bus systems. In the AVR, 51 series, PIC microcontroller, the 51 series is the most basic, and at the same time there are shortcomings such as easy decryption; PIC microcontroller industry has strong anti-interference ability, and the compatibility of each model is strong; AVR's latest MEGA series runs fast. All kinds of single-chip computers have their own advantages and disadvantages, and should be selected according to needs.

Keywords: microcontroller, AVR, 51 series, PIC, performance comparison analysis

Comparative Analysis of AVR, 51 Series and PIC Single Chip Microcomputer

1, 51 series of single-chip microcontroller advantages and disadvantages analysis.

The 51 series is the most widely used single-chip microcomputer. Due to the reasonable hardware structure of the product, the specification of the command system, and the “long-term” production history, there is a pre-emptive advantage. Many famous chip companies in the world have purchased the core patent technology of 51 chips, and on the basis of the performance expansion, the chip has been further improved, forming a huge system, which is still being refurbished until now. The world of SCM has been heated up.

One of the advantages of the 51 series is that it has a complete bit-wise operating system, called a bit processor, or a Boolean processor, from internal hardware to software. Its processing object is not a word or a byte but a bit. It can not only process certain bits of some special function registers in the chip, such as transfer, set, clear, test, etc., but also perform bit logic operations. Its function is very complete and easy to use. Although other types of microcontrollers also have bit processing functions, it is rare to be able to perform bit logic operations.

The 51 series also opens up a dual-function address range, 16 bytes, and unit address 20H~2FH in the on-chip RAM area. It can be used for both byte processing and bit processing. 128 bits, the corresponding bit address is OOH ~ 7FH), the use is extremely flexible. This function undoubtedly provides great convenience to the user, because a more complicated program will encounter many branches during the running process, so many flag bits need to be established. During the running process, the relevant flag bits need to be set. Bit, clear, or detect to determine the direction in which the program is running. To implement this process (including all of the previous bit functions), you only need to use one bit of operation instructions.

Another advantage of the 51 series is the multiplication and division instructions, which also facilitates programming. Eight divisions divided by eight division instructions, the business is eight, the accuracy is not enough, not much used. The multiplication instruction of eight bits by eight bits has a product of sixteen bits, and the accuracy can still meet the requirements, and more is used. When multiplying, you only need one instruction. Many 8-bit MCUs do not have a multiply function. When multiplying, they have to be programmed with a subroutine call, which is very inconvenient.

The setting and use of the 51 series I/O pins is very simple, but there is no output capability at high level, which has advantages and disadvantages. Therefore, other series of single-chip microcomputers (such as PIC series, AVR series, etc.) have improved the I/O port, and added direction registers to determine the input or output, but the use is also complicated.

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

2. Analysis of the advantages and disadvantages of PIC microcontroller.

The PIC microcontroller CPU adopts the RISC structure, with 33, 35, and 58 instructions respectively (depending on the level of the microcontroller), which is a reduced instruction set. The 51 series has 111 instructions, and the AVR microcontroller has 118 instructions, which are more complicated than the former. It adopts Haryard dual bus structure and runs fast (instruction cycle is about 160~200nS). It can make program memory access and data memory access parallel processing. This instruction pipeline structure completes two parts in one cycle. Execution of the instruction, the second is to take the next instruction from the program memory, so that it seems that each instruction only needs one cycle (except for individual), which is one of the reasons for high efficiency operation. In addition, it features low operating voltage, low power consumption, and high drive capability.

The I/O ports of the PIC series MCUs are bidirectional, and their output circuits are CMOS complementary push-pull output circuits. The I/O pin adds a direction register for setting the input or output state, which solves the state of the input and output when the 51 series I/O pin is high. When set to 1, it is the input state, and regardless of whether the pin is high or low, it is in a high-impedance state; when it is set to 0, it is an output state, regardless of the level of the pin, it is in a low-resistance state. , has a considerable driving capacity, low-level suction current up to 25mA, high-level output current up to 20mA. Compared with the 51 series, this is a big advantage, it can directly drive the digital tube display and the external circuit is simple. Its A/D is 10 bits, which can meet the accuracy requirements. With online debugging and programming capabilities.

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, that is, bank 0 (Bank0: 00-7FH), Bank 1 (Bank1: 80-FFH), Bank 2 (Bank 2: 100-17FH), Bank 3 (Bank3: 180-1FFH). Only five dedicated registers, PCL, STATUS, FSR, PCLATH, and INTCON, appear simultaneously in four banks. In the programming process, it is indispensable to deal with the special register, and the corresponding bank is repeatedly selected, that is, the sixth bit (RP1) and the fifth bit (RPO) of the status register STATUS are set or cleared. This somewhat brings some trouble to programming.

For the above-mentioned single-chip microcomputer, its bit instruction operation is usually limited to the bank 0 interval (00 to 7FH). The data transfer and logic operations are basically performed by the working register w (equivalent to the accumulator A of the 5l series), and the 51 series can also be directly transferred between the registers (eg, MOV30H, 20H; the register 20H) The content is directly transferred to the register 30H), so the bottleneck phenomenon of the PIC microcontroller is more serious than the 51 series, which is very interesting in programming.

In summary, the PIC microcontroller should have three main features:

(1) Bus structure: The bus structure of MCS-51 MCU is von Neumann type. The computer fetches instructions and data in the same storage space. The two can't be simultaneously; the bus structure of PIC MCU is Harvard structure, instruction and The data space is completely separate, one for instructions and one for data, which increases data throughput because both programs and data can be accessed simultaneously. Because the Harvard dual bus architecture is used in PIC microcontrollers, the difference from common microcontrollers is that the program and data buses can be of different widths. The data bus is 8-bit, but the instruction bus bits are 12, 14, and 16 bits, respectively.

(2) Pipeline structure: The instruction and execution of the MCS-51 MCU adopts a single instruction pipeline structure, that is, one instruction is taken, and one instruction is taken after execution; and the PIC instruction and execution adopt a dual instruction pipeline structure, when a When the instruction is executed, the next instruction is allowed to be fetched at the same time, thus implementing a single-cycle instruction.

(3) Register group: All registers of PIC microcontroller, including I/O port, timer and program counter, all adopt RAM structure, and only need one instruction cycle to complete access and operation; MCS-51 microcontroller needs Two or more cycles can change the contents of the register.

3. Analysis of the advantages and disadvantages of AVR single chip.

The remarkable features of AVR microcontrollers are high performance, high speed and low power consumption. It cancels the machine cycle and executes the pipeline operation with the clock cycle as the instruction cycle. AVR microcontroller instructions are in word units, and most of the instructions are single-cycle instructions. The single cycle can perform the function of this instruction and complete the reading of the next instruction. A total of 32 general-purpose registers (RO-R31), the first 16 registers (R0 ~ R15) can not directly deal with the immediate, so the versatility has decreased. In the 5l series, all of its general-purpose registers (address 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 to R31 registers. In the AVR, there is no data pointer DPTR like the 5l series, but three 16-bit registers from X (composed of R26, R27), Y (composed of R28, .R29), and z (consisting of R30, R31). The function of the data pointer is completed (equivalent to having three sets of DPTRs), and it can also be operated after the increment or the first decrease.

In the 51 series, all logic operations must be done in A; the AVR can be done between any two registers, eliminating the need to toss back and forth in A, which is stronger than the 51 series.

The dedicated registers of the AVR are concentrated in the $00 to $3F address range. It is not necessary to select the bank before the PIC, which is more convenient to use than the PIC. AVR's on-chip RAM has an address range of $0060 to $00DF (AT90S23131) and $0060 to $025F (AT90S85l5, AT90S8535). They occupy the address of the data space. These on-chip RAMs are only used to store data, usually not Has the function of a general purpose register. When the program is complicated, the general-purpose registers R0-R31 are not enough; while the 51-series has up to 128 general-purpose registers (four times that of the AVR), this is not the case when programming.

The AVR's I/O pin is similar to the PIC. It also has a direction register for controlling the input or output. In the output state, the high-level output current is about 10mA, and the low-level sink current is 20mA. Although not as good as PIC, it is stronger than the 51 series.

On the whole, AVR has a series of advantages compared with 51 and PIC microcontrollers. The popular sayings are mainly reflected in these aspects:

(1) AVR runs fastest under the same system clock;

(2), FLASH and EEPROM accumulators of all AVR MCUs can be repeatedly programmed and supported in ISP online programming (burning), the entry fee is very small;

(3), on-chip integration of multiple frequency RC oscillator, power-on automatic reset, watchdog, start delay and other functions, making the circuit design very simple;

(4) Each IO port can output a strong high and low level when it is output. When inputting, the IO port can be high impedance or with pull-up resistor;

(5), the chip has a wealth of practical resources, such as AD analog, DA digital model, rich interrupt source, SPI, USART, TWI communication port, PWM, etc.;

(6), the use of advanced data encryption technology on the chip, greatly improving the difficulty of cracking;

(7), the FLASH space on the chip is large, the variety is large, the pin has 8 pins, and the other has 64 pins and other packages.

(8), some chips are pin compatible with 51 series, easy to replace, such as ATtiny2313 compatible with AT89C2051, ATmega8515/162 compatible with AT89S51, etc.

4, the choice of microcontroller.

All kinds of single-chip computers have their own advantages and disadvantages, and should be selected according to needs. The principle of selecting a microcontroller is as follows:

1. Basic parameters of the microcontroller such as speed, program memory capacity, number of I/O pins

2. Enhanced functions of the MCU, such as watchdog, dual pointer, dual serial port, RTC (real time clock), EEPROM, extended RAM, CAN interface, I2C interface, SPI interface, USB interface.

3. Flash and OTP (one-time programmable), preferably Flash.

4. Package î–ŠIP (dual in-line), PLCC (PLCC has corresponding socket) or patch. The DIP package may be a bit more convenient when doing experiments.

5. Operating temperature range, industrial grade or commercial machine. If you design outdoor products, you must use industrial grade.

6. Power consumption, such as designing a parallel port dongle, the signal line can only provide a few mA. The use of PIC is because of low power consumption. Later, the MSP430 is also good.

7. Operating voltage range. For example, designing a TV remote control, powered by two dry batteries, should work at least in the range of 1.8-3.6V.

8. The supply channels are smooth. Can apply for samples, small quantities are available in stock. It’s best to go to the standard 51, and you can buy it at the counter in the middle of the hair (I am in Beijing).

9. The price is low.

10. There are service providers, such as Zhou Ligong's push for Philips and Ssangyong's push for AVR, which provide a lot of useful technical support. At least there is a place to buy the programmer.

11. The price of the burner is low. If it is ICP (programming the microcontroller on the programmer), can you use the existing burner? If it is a surface mount package, it is very expensive to buy a adapter. At least one Two hundreds. Can ISP (in the system programming, that is, the chip is first soldered to the board and then through the reserved ISP interface programming), the general ISP programmer is relatively cheap about one or two hundred yuan or even tens of dollars.

12. The emulator is cheap. For FLASH type microcontrollers, the emulator is not required. However, for OTP (One Time Programmable) type microcontrollers, the emulator must be purchased or rented.

13. The MCU assembly language is familiar to you and supports the C language. The programming environment is as easy to use as keil and is still free.

14. The website is fast and informative. Includes chip manuals, application guides, design options, and sample programs. It is best to have Chinese, like Atmel is good.

15. Confidentiality is good, check the blacklist on the professional decryption website, and then send a mail to consult the decryption price.

16. Good anti-interference performance. I once changed the XXC52 to S52 and found that the anti-interference performance was degraded, so I had to change it back.

17. Comprehensive considerations with other peripheral chips

Bang 7000

Bang 7000 Disposable Vape is the newest type of bang brand. It's a best alternative for the traditional cigaratte. This vape comes with 10 different delicious flavors within a very high puff yielding device. Though the device is having no buttons, you just need to start vaping in order to turn the device on. The bang 7000 is also known as the all-in-one vaping system because of its various quality features. The nic salt amount present in the e-liquid has the ability to boost up the taste of the flavour in your device. The device mechanism is fully automatic and there is no complexity in its usage.

bang 7000, disposable vape, bang 7000 vape, bang 7000 disposable, bang 7000 wholesale, bang 7000 flavor, bang 7000 australia, bang 7000 vape pen

Shenzhen Kate Technology Co., Ltd. , https://www.katevape.com

Posted on