What 8-bit microcontrollers are there at present?

Generally speaking, the most commonly used 8-bit single chip microcomputer is three series:

1, 5 1 series: taking intel MCS5 1 as the core, many companies have bought its core and produced 5 1 single chip microcomputer by themselves, mainly ATMEL (AT89S52, etc. ), StC (such as STC89C52RC), Winbond, Motorola and St.

2.AVR series: represented by ATmega 16 of ATMEL Company.

3.PIC series: PIC 16F877 of MICROCHIP Company is the representative.

In addition, there are special industrial single-chip computers, which are rarely seen, such as Hetai, Yilong and Samsung in Taiwan Province Province. These single-chip computers are often small in size, powerful but single-minded, and the price is very cheap. For example, development equipment is very expensive, and most people can't afford it.

The STM8 that appeared two years ago is also very strong.

16 bit single chip microcomputer, the most famous products are MSP430 and Freescale series.

There are many 32-bit single-chip microcomputers, but they generally contain ARM cores, and have begun to transition to ARM, such as STM32.

Basic structure

potato

Arithmetic unit consists of arithmetic unit-arithmetic logic unit (arithmetic &; Logic unit (ALU), accumulator and register. The function of ALU is to perform arithmetic or logical operations on the input data. The input source is two 8-bit data from the accumulator and the data register respectively. ALU can add, subtract, sum or compare the sizes of these two data, and finally store the results in the accumulator. For example, two numbers 6 and 7 are added. Before addition, operand 6 is put into the accumulator and 7 is put into the data register. When executing the addition instruction, ALU adds these two numbers and stores the result 13 in the accumulator to replace the original content 6 of the accumulator.

The arithmetic unit has two functions:

(1) performs various arithmetic operations.

(2) Carry out various logical operations and carry out logical tests, such as zero value test or two-value comparison.

All the operations performed by the arithmetic unit are guided by the control signals sent by the controller. Arithmetic operation produces operation results, and logical operation produces decisions.

controller

The controller consists of a program counter, an instruction register, an instruction decoder, a timing generator and an operation controller. It is the "decision-making body" that issues orders, that is, it coordinates and directs the operation of the whole microcomputer system. Its main functions are:

(1) fetches an instruction from memory and indicates the location of the next instruction in memory.

(2) Decode and test the instructions, and generate corresponding operation control signals to facilitate the execution of the specified actions.

(3) Command and control the direction of data flow among CPU, memory and input/output devices.

The microprocessor interconnects the ALU, the counter, the register and the control part through the internal bus, and is connected with the external memory and the input/output interface circuit through the external bus. The external bus, also known as the system bus, is divided into data bus DB, address bus AB and control bus CB. Through the input and output interface circuit, the connection with various peripheral devices is realized.

main storage

(1) accumulator a

Figure 1-2 composition block diagram of single chip microcomputer

Accumulator A is the most commonly used register in microprocessor. It plays a dual role in arithmetic and logical operations: it is used to save an operand before operation; After operation, it is used to save the result of sum, difference or logical operation.

(2) data register DR

A data register is a temporary storage unit that sends (writes) or reads (reads) data to a memory and input/output devices through a data bus. It can store instructions being decoded, data bytes sent to memory for storage, and so on.

(3) instruction register IR and instruction decoder ID

Instructions include operation codes and operands.

The instruction register is used to store the instruction currently being executed. When an instruction is executed, it is first fetched from the memory into the data register and then transferred to the instruction register. When the system executes a given instruction, the operation code must be decoded to determine the required operation, and the instruction decoder is responsible for this work. The output of the opcode field in the instruction register is the input of the instruction decoder.

(4) program counter PC

PC is used to determine the address of the next instruction to ensure the continuous execution of the program, so it is often called the instruction address counter. Before the program starts to execute, the address of the memory unit of the first instruction of the program (that is, the first address of the program) must be sent to the PC, so that it always points to the address of the next instruction to be executed.

(5) address register AR

The address register is used to store the address of the memory unit or I/O device to be accessed by the current CPU. Due to the speed difference between memory and CPU, address registers must be used to store address information until the memory read/write operation is completed.

Obviously, when the CPU stores data in the memory, the CPU takes out the data from the memory, and the CPU reads instructions from the memory, using address registers and data registers. Similarly, if the address of the peripheral device is regarded as a memory address unit, then the CPU and the peripheral device also need to use address registers and data registers when exchanging information.