The composition, working principle, classification, characteristics and development trend of single chip microcomputer

The emergence of microcomputers has brought about fundamental changes in human life, which has made a qualitative leap in modern scientific research. The emergence of single-chip technology has brought a new technological revolution to the field of modern industrial measurement and control. It has been widely used in many fields such as industrial control, numerical control acquisition, intelligent instrumentation, office automation, etc. It is no exaggeration to say that the development and application level of single-chip technology has gradually become one of the symbols of a country's industrial development.

The composition, working principle, classification, characteristics and development trend of single chip microcomputer

What is a microcontroller?

A single-chip microcomputer is an integrated circuit chip that uses a large-scale technology to provide a microprocessor (CPU) with data processing capabilities (such as arithmetic operations, logic operations, data transfer, interrupt processing), random access data memory (RAM), read-only Program memory (ROM), input/output circuit (I/O port), may also include timer counter, serial communication port (SCI), display driver circuit (LCD or LED driver circuit), pulse width modulation circuit (PWM), analog Circuits such as multiplexers and A/D converters are integrated into a single chip to form a minimal yet complete computer system. These circuits are capable of accurately, quickly and efficiently performing the tasks predetermined by the programmer under the control of the software. From this point of view, the microcontroller has the functions that the microprocessor does not have, it can completely complete the intelligent control functions required by modern industrial control, which is the biggest feature of the microcontroller.

The composition, working principle, classification, characteristics and development trend of single chip microcomputer

Before the chip is developed, the MCU is only a very large-scale integrated circuit. If it is given a specific program, it is a minimal and complete microcomputer control system. It has an essential function with a personal computer (PC). The difference, the application of the microcontroller belongs to the chip-level application, the user needs to understand the structure and instruction system of the microcontroller chip and other integrated circuit application technology and system design theory and technology, use this specific chip design application, so that the chip has Specific features.

Different MCUs have different hardware features and software features, that is, their technical characteristics are different. The hardware characteristics depend on the internal structure of the MCU chip. Users must use a certain MCU to understand whether the product meets the required functions and The characteristic indicators required by the application system. The technical features here include functional characteristics, control characteristics and electrical characteristics, etc., which need to be obtained from the manufacturer's technical manual. Software features refer to the instruction system characteristics and development support environment. The instruction features are the addressing modes of the microcontrollers we are familiar with, data processing and logic processing methods, input and output characteristics and power requirements. Development support environments include compatibility and portability of instructions, support software (including software resources to support development of applications), and hardware resources. It is necessary to use a certain type of single-chip microcomputer to develop its own application system and master its structural characteristics and technical features.

The MCU control system can replace the previous control system composed of complex electronic circuits or digital circuits, which can be realized by software control and can be intelligentized. Now the scope of MCU control is ubiquitous, such as communication products, household appliances, intelligent instrumentation, process control and Specialized control devices, etc., the application fields of single-chip microcomputers are more and more extensive. It is true that the application significance of the single-chip microcomputer is far from being limited to its application scope or the economic benefits brought about by it. More importantly, it has fundamentally changed the traditional control methods and design ideas. It is a revolution in control technology and an important milestone.

The basic working principle of single chip microcomputer

The process of automatically assigning the task assigned to it by the single-chip microcomputer, that is, the process of executing the program by the single-chip microcomputer, that is, the process of executing the instructions of the article, the so-called instruction is written in the form of the command for the various operations required to be executed by the single-chip microcomputer, which is in the design The instructions given by the personnel to its instruction system correspond to a basic operation; all the instructions that the MCU can execute are the instruction system of the MCU, and the instruction systems of different types of MCUs are different.

The composition, working principle, classification, characteristics and development trend of single chip microcomputer

In order for the microcontroller to automatically perform a specific task, the problem to be solved must be programmed into a series of instructions (these instructions must be instructions that the selected microcontroller can recognize and execute). The set of instructions becomes a program, and the program needs Pre-stored in the memory-capable component - memory. The memory is made up of many storage units (the smallest storage unit). Just like the building has many rooms, the instructions are stored in these units. The instructions in the unit are taken out and executed just like each room in the building is assigned. Like a room number, each storage unit must also be assigned a unique address number, which is called the address of the storage unit, so that as long as the address of the storage unit is known, the storage unit can be found, and the stored instructions are stored. Can be taken out and then executed.

Programs are usually executed sequentially, so the instructions in the program are also stored in a sequence. The microcontroller must be able to fetch and execute these instructions when executing the program. There must be a component that can track the address where the instruction is located. It is the program counter PC (included in the CPU). When starting the program, the PC is given the address where the first instruction in the program is located, and then each command to be executed is obtained, and the content of the PC is automatically increased. The amount of increase is determined by the length of this instruction, which may be 1, 2 or 3 to point to the start address of the next instruction, ensuring that the instructions are executed sequentially.

The composition of the microcontroller

Taking the MSC-51 series MCU as an example, the MCU consists of five basic parts, including the CPU, memory, input/output port, timer/counter, and interrupt system.

The composition, working principle, classification, characteristics and development trend of single chip microcomputer

MCU CPU structure

The 51 MCU has an 8-bit CPU inside, including the operator, controller and several registers.

From the above figure, we can see that inside the dotted line is the internal structure of the CPU. The CPU of the 8-bit MCS-51 microcontroller has several arithmetic logic units ALU (ArithmeticLogic Unit), accumulator A (8 bits), and registers. B (8 bits), program status word PSW (8 bits), program counter PC (sometimes called instruction pointer, ie IP, 16 bits), address register AR (16 bits), data register DR (8 bits), instructions Register IR (8 bits), instruction decoder ID, controller and other components.

MCU memory

The memory is used to store programs and data. The MCS-51 microcontroller chip internal memory includes program memory and data memory.

1, program memory (ROM)

Generally used to store fixed programs and data, the feature is that the program can be stored for a long time after being written, and will not be lost due to power failure. The MSC-51 series MCU has 4KB of program storage space inside, which can be extended to 64KB by external.

2, data storage (RAM)

Mainly used to store various data.

Advantages: It can be read or read randomly, with fast reading and writing speed and convenient reading and writing.

Disadvantages: The stored information is lost after the power is turned off.

Parallel I/O of single chip microcomputer

1, P0 port

The port line logic circuit of port P0 is as shown

2, P1 port

P1 port line logic circuit as shown

3, P2 port

P2 port line logic circuit as shown

4, P3 port

P3 port line logic circuit as shown

The clock and timing of the microcontroller

1, the clock circuit

The microcontroller clock circuit usually has two forms: internal oscillation mode and external oscillation mode.

The MCS-51 microcontroller has a high-gain inverting amplifier for the oscillator. The pins XTAL1 and XTAL2 are the input and output of the amplifier, respectively. Connecting the amplifier to the crystal oscillator forms the internal self-excited oscillator and produces an oscillating clock pulse.

The external oscillation mode is to connect the external clock signal directly to the XTAL1 terminal and introduce it into the MCU. The XTAL2 terminal is not used.

2, timing

Oscillation period: The period of the oscillation source that provides the clock signal to the microcontroller.

Clock cycle: It is a clock pulse signal formed by the oscillation source signal after being divided by two. Therefore, the clock period is twice the oscillation period, that is, one S period, which is divided into two beats - P1, P2

Instruction cycle: The time required by the CPU to execute an instruction (in machine cycles).

The relationship between the timings is as shown.

The characteristics of the microcontroller

The path taken since the advent of the microcontroller has been different from that of microprocessors. Microprocessors are moving toward high-speed computing, data analysis and processing capabilities, and large-scale capacity storage to improve the performance of general-purpose computers. Its interface interface is also designed to meet peripherals and network interfaces. The single-chip microcomputer is developed from the aspects of industrial measurement and control objects, environment and interface characteristics, and aims to enhance the control function, improve the reliability under the industrial environment, and be flexible and convenient to form the interface interface of the application computer system. Therefore, the MCU has its own characteristics, mainly:

1, variety, variety and variety

Variety models are expanded year by year to suit various needs. Give system developers a lot of freedom of choice. CPUs range from 4, 8, 16, 32 to 64, and some also use RISC technology;

2, improve performance, expand capacity

The integration has reached more than 2 million transistors. The bus has been operating at speeds of tens of microseconds. The operating frequency reaches 30MHz or even 40MHz. The instruction execution cycle is reduced to tens of microseconds. Memory capacity RAM has been developed to 1K, 2K, ROM has developed to 32K, 64K;

3, increase the control function, extend to the external interface

Integrate the functions of the original peripheral chip into the chip. Today's microcontrollers have been developed on a chip with a CPU, in addition to embedded RAM, ROM memory and I / O interface, as well as A / D, PWM, UART, Timer / Counter, DMA, Watchdog, SerialPort, Sensor, driver And display driver, keyboard control, function generator, comparator, etc., constitute a complete and powerful computer application system;

4, low power consumption

The supply voltage is reduced from 5V to 3V, 2V or even 1V. The operating current is reduced from mA to LA. Substituting CMOS for CMOS in the production process and transitioning to HCMOS;

5, application software package

A software library is provided, including standard application software and demonstration design methods. It makes the user develop the MCU application system more quickly and conveniently. Make it possible to develop a new application in a week;

6, system expansion and configuration

There are three bus structures DB, AB, and CB for extending external circuits to facilitate the construction of various application systems. According to the characteristics of the single-chip network system and multi-machine system, the serial communication bus of the single-chip microcomputer is specially developed. In addition, it is specially equipped with sensors, human-machine dialogue, network multi-channel and other interfaces to form a network and multi-machine system.

The development trend of single chip microcomputer

1, low power CMOS

The power consumption of the 8021 of the MCS-51 series is 630mW, and the current MCUs are generally around 100mW. With the lower and lower power requirements of the MCU, the current MCU manufacturers have basically adopted CMOS (complementary metal). Oxide semiconductor process). Like 80C51, HMOS (ie high-density metal oxide semiconductor process) and CHMOS (complementary high-density metal oxide semiconductor process) are used. Although CMOS has lower power consumption, its physical characteristics determine its speed is not high enough, while CHMOS has the characteristics of high speed and low power consumption. These features are more suitable for applications requiring low power consumption like battery power. Therefore, this process will be the main way to develop microcontrollers in the future.

2, micro-single

Nowadays, conventional MCUs generally integrate a central processing unit (CPU), random access data storage (RAM), read-only program memory (ROM), parallel and serial communication interfaces, interrupt systems, timing circuits, and clock circuits. On a single chip, the enhanced microcontroller integrates such as A/D converter, PMW (pulse width modulation circuit), WDT (watchdog), and some single-chip microcomputers integrate LCD (liquid crystal) driver circuits on a single chip. In this way, the microcontroller contains more unit circuits and the more powerful the functions. Even MCU manufacturers can also tailor the MCU chip with its own characteristics according to the requirements of users.

In addition, the current products generally require small size and light weight, which requires the microcontroller to have a small size in addition to its high function and low power consumption. Many of today's single-chip microcomputers come in a variety of packages, of which SMD (surface package) is becoming more and more popular, making the system composed of single-chip microcomputers moving toward miniaturization.

3. Mainstream and multiple varieties coexist

Although the variety of single-chip microcomputers has its own characteristics, it still dominates the 80C51 core. Therefore, C8051 is the core of the single-chip computer occupied half of the country. Microchip's PIC Reduced Instruction Set (RISC) also has a strong momentum of development. The Taiwanese HOLTEK company's MCU production has increased in recent years, and it has a certain market share with its low price and superior quality. In addition, there are products from MOTOROLA, and special-purpose microcontrollers from several major Japanese companies. In a certain period of time, this situation will continue, there will be no monopoly situation in which a single-chip computer dominates the world, and it will follow the path of complementarity, complementarity and common development.

Main types and characteristics of mainstream microcontroller

51 single chip microcomputer

The most widely used 8-bit single-chip microcomputer is of course the most easy-to-learn microcontroller for beginners. It was first introduced by Intel. Due to its typical structure and centralized management of bus-specific registers, numerous logic bit operation functions and rich control-oriented functions. The instruction system, called the "classic" of a generation, laid the foundation for the development of other microcontrollers in the future.

The composition, working principle, classification, characteristics and development trend of single chip microcomputer

Features:

1. From internal hardware to software, there is a complete set of bit-wise operating system called bit processor. The processing object is not a word or a byte but a bit. Not only can some bits of some special function registers in the chip be processed, such as transfer, set, clear, test, etc., but also bit logic operations, its function is very complete, and it is easy to use.

2. At the same time, in the on-chip RAM area, a dual-function address range is specially opened, which is extremely flexible to use. This function undoubtedly provides great convenience to the user.

3, multiplication and division instructions, which brings convenience to programming. 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.

Disadvantages:

1, AD, EEPROM and other functions need to rely on expansion, increasing the burden of hardware and software

2. Although the I/O pin is simple to use, it has no output capability when it is high. This is also the biggest weakness of the 51 series MCU.

3, the running speed is too slow, especially the double data pointer, if it can improve, it can bring great convenience to programming.

4, the protection ability is very poor, it is easy to burn the chip

MSP430 microcontroller

The MSP430 series of single-chip microcomputers is a 16-bit ultra-low-power mixed-signal processor that Texas Instruments introduced to the market in 1996. The biggest bright spot left by people is low power consumption and fast speed. The assembly language is very flexible. There are many addressing methods, few instructions, and easy to use. Mainly due to its practical application requirements, many analog circuits, digital circuits and microprocessors are integrated on one chip to provide a "single-chip" solution.

The composition, working principle, classification, characteristics and development trend of single chip microcomputer

Features:

1. Powerful processing capability, reduced logic instruction set (RISC) structure, rich addressing mode (7 source operand addressing, 4 destination operand addressing), 27 simple kernel instructions and a large number of Analog instructions; a large number of registers and on-chip data memory can participate in a variety of operations; there are efficient table lookup processing instructions; a higher processing speed, the instruction cycle is 125 ns under 8MHz crystal drive. These features ensure that highly efficient source programs can be programmed

2. In terms of operation speed, it can realize 125ns instruction cycle under the driving of 8MHz crystal. 16-bit data width, 125ns instruction cycle, and a versatile hardware multiplier (which can implement multiply-accumulate) to implement certain algorithms for digital signal processing (such as FFT)

3, ultra-low power, MSP430 microcontroller has ultra-low power consumption, because it has its own unique features in reducing the chip's power supply voltage and flexible and controllable operating clock. The power supply voltage is 1.8~3.6V. Therefore, when the clock is running at 1MHz, the current of the chip will be around 200~400uA, and the minimum power consumption of the clock shutdown mode is only 0.1uA.

Disadvantages:

1, personal feeling is not easy to get started, not suitable for beginners to get started, the information is relatively small, can only go to the official website to find

2, the occupied instruction space is larger, because it is a 16-bit microcontroller, the program is in words, and some instructions actually occupy 6 bytes. Although the program is simple on the surface, it takes a lot of space compared to the pic microcontroller.

STM32 microcontroller

The STM32 series of single-chip microcomputers introduced by ST manufacturers, the industry's friends know that this is a series of high-performance single-chip microcontrollers, there should be no one, the function and its powerful. It is based on an ARM Cortex-M core specifically designed for embedded applications requiring high performance, low cost, low power, and first-class peripherals: 1μs dual 12-bit ADC, 4 Mbit/s UART, 18 Megabits per second SPI, etc., also has a good performance in terms of power consumption and integration. Of course, it is slightly inferior to the power consumption of MSP430, but this does not affect the degree of enthusiasm of engineers. Because of its simple structure and easy-to-use tools, it is well-known in the industry for its powerful functions.

Features:

1. Core: ARM32 bit Cortex-M3CPU, maximum operating frequency 72MHz, 1.25DMIPS/MHz, single cycle multiplication and hardware division

2. Memory: 32-512KB flash memory is integrated on-chip. 6-64KB SRAM memory

3. Clock, reset and power management: 2.0-3.6V power supply and I/O interface drive voltage. POR, PDR and programmable voltage detector (PVD). 4-16MHz crystal. Built-in factory-adjusted 8MHz RC oscillator circuit. Internal 40 kHz RC oscillator circuit. PLL for the CPU clock. 32kHz crystal with calibration for RTC

4. Debug mode: Serial Debug (SWD) and JTAG interface. Up to 112 fast I/O ports, up to 11 timers, up to 13 communication interfaces

PIC microcontroller

The PIC microcontroller series is a product of Microship, which is divided into three levels, namely basic level, intermediate level and advanced level. It is one of the fastest growing single-chip microcomputers in the market. The CPU adopts RISC structure, respectively 33, 35 The 58 instructions are a reduced instruction set and adopt Harvard dual bus structure. The running speed is fast. It can make program memory access and data memory access parallel processing. This instruction pipeline structure completes two parts in one cycle. One is to execute the instruction, the other is to take the next instruction from the program memory, so that it seems that each instruction only takes one cycle, which is one of the reasons for high efficiency operation.

The composition, working principle, classification, characteristics and development trend of single chip microcomputer

Features:

1. It has the characteristics of low working voltage, low power consumption and strong driving ability. 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.

2. 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 low. The resistance state has a considerable driving capability, the low-level sink current reaches 25mA, and the high-level output current can reach 20mA. This is a big advantage over the 51 series.

3. 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 (ISP) capabilities.

Disadvantages:

The dedicated registers (SFRs) are not concentrated in a fixed address range (80 to FFH) like the 51 series, but are scattered in four address ranges. Only five dedicated registers PCL, STATUS, FSR, PCLATH, and INTCON appear simultaneously in four banks, but in the programming process, it is indispensable to deal with special registers, and the corresponding bank must be selected repeatedly, that is, the status register STATUS Bit 6 (RP1) and 5 (RP0) are set or cleared. The data transfer and logic operations basically have to be done through the working register W (equivalent to the 51 series accumulator A), and the 51 series can also be directly transferred between the registers, so the bottleneck phenomenon of the PIC microcontroller is better than the 51 series. Still serious, this friend in programming should have a deep understanding


Box Header Connector

Box Header Connector,Dual Row R-Type Box Header Connector,Box Header Straight Elevator Connector,Smt Box Header 2.0Mm Connector

Dongguan Yangyue Metal Technology Co., Ltd , https://www.yyconnector.com