Microcontroller

Microcontroller
Microcontroller

Microcontrollers has token a tremendous impact on human society since the advent in 1970s.Because of its many favorable advantages, such as high degree of integration and processing function, eximious reliability, simple structure of system, the lower price, simple using and so on, being widely used in industry controlling, intelligent instrument and meter, office automation, and household appliances. Without any exaggeration, we can say that any product will be upgrading and strengthening if adding microcontrollers into itself.

Another name of microcontrollers is said single chip micro controller, a kind of integrated circuit chip, use ultra large scale integrated circuit technology, integrate processing data capability of the central processing unit (CPU), random access memory ram, only reading memory ROM, varieties of I/O port and interrupt system, timer/counter act into a piece of silicon to constitute a small and perfect microcomputer system. With its small volume, low weight and price, provide convenience for studying, using and improving. It was only 4bit and 8bit in the last century 80's, but now it has improved into high speed MCU with 300M.

Microcontrollers is one important area of computer improvement approaches. From the situation of its improvement, it can be divided into universal/special type, bus type and control type. On the one hand, it has the style of its own hardware features, simple structure of system, easy using and modularization; On the other hand, the pretty prefect reliability can guarantee to work 10^6 ~10^7 hours without any problem; Last but not least what can not be ingored is the beyond imagination of handling capacity and running speed, low voltage and power consumption, easy to produce portable product, and the capacity of working in any terrible environment.

Next, let’s make further efforts to study it from structure. Microcontrollers can be mainly divided into arithmetic, controller, main register.

Arithmetic

Arithmetic consists of Arithmetic and Logical unit named ALU, accumulator and register and so on. ALU can take arithmetic or logic operation on the pass data, the input source of two 8-bit data, respectively from the accumulator and data registers. Therefore, ALU can take operation of add, subtract, and, or, campare the size of the two data, and then put the result into accumulator. For example, the two number of 6 and 7 will respectively be put into accumulator and data register before adding, and ALU will write the result into accumulator in order to take place in the past number 6, while take the operation of add.

The arithmetic has two functions:

(1)Take all different operations of number

(2)Take some logic operations and the logic measurement, such as zero testing and the

comparison of two number

Arithmetic’s all operations are controlled by the signal sent from the controller. Besides, a number counting takes a result and a logic operation decides on a comparison.

Controller

Controller consists of a program counter, instruction register, the instruction decoder, timing generator and handling controller, is the "decision-making mechanism of issuing an order, and coordinates and command the operation of the entire computer system. Its main functions are:

(1) Take an instruction from memory and indicate the location of the next instruction in memory.

(2) Decode and test the instruction, and product the control signal in order to executive the prescribed action.

(3) command and control the direction of the flowing data between the CPU, the memory and the input and output devices.

The microprocessor connects the ALU, counter, register and control part by internal bus, and links to the external memory, the input and output interface circuit by external bus. The external bus is also called the system bus, which is divided into data bus DB, address bus AB and control bus CB. Through the input and output interface circuit, to achieve a variety of peripheral devices connection.

Main register

(1)Accumulator A

Accumulator A is the frequently used register among microprocessor. While taking the

operation of number and logic, we can see its two functions: save a operand before

beginning; save the operational result of add, subtract or logic after achieving.

(2)Data register DR

Data register writes or reads the data temporary storage unit into register memory and

input / output equipment through a data bus. It can save a decoding instruction, and a data byte stored in the memory act.

(3)Instruction register IR and instruction decoder ID

Instructions include operating code and operand.

Instruction register is an instruction that is used to save the current execution. When executing an instruction, it is taken from the memory into data register, and then sent to the instruction register. When the system is executing a given instruction, it must be decoded to determine the required operation, and the instruction decoder is responsible for the work. Among them, the output of the operation code 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, in order to ensure that the program can continue to execute, and therefore is often referred to as the instruction address counter. The memory cell address of the first instruction of the program must be sent to the PC, the first address of the program, so that it always points to the address of the next instruction to be executed.

(5)Address register AR

Address register is used to save the address of the memory cell or I/O device to be accessed by the current CPU. Because of the difference between the memory and the CPU, we must use the address register to keep the address information until the memory read / write operation is completed.

Obviously, when the CPU storage data to the memory, CPU take data and read instruction from the memory, it will use address registers and data registers. Likewise, if the address of the peripheral device is used as a memory address unit, the address register and data register are also required for the CPU and peripheral devices to exchange information.

We can detailedly illustrate by the example of AT89C51 microcontrollers.

AT89C51 is the earlist and the most typical product in the industry of microcontrollers. It is famous for its outstanding capacity of reliable operation, high speed, durable using and stands in the leading position of industry, which attributes the success to its special features. Because it not only takes CPU as the core, but also connects CPU and the other components with three bus.

The structure and function of 51microcontroller

The fundamental function:

1.The data bus of 8 bit, and the CPU of 16bit address bus;

2.The operational capacity of Boolean and bit;

https://www.360docs.net/doc/8c6576698.html,ing Harvard structure, which program memory and data memory are on their own,

are helpful to design program;

4.Ttaking the same address between 64KB program memory and 64KB data memory;

5.0-8KB inner program memory;

6.128 bit inner data memory;

7.32 bidirectional I/O bus can search address in bit

8.Two 16bit timing/counting devices;

9. A absulotely duplex I/O interface

10.Some interruptive structures from interruptive origin, and two interruptive priorities;

11.Inner timing oscillator;

Now that we have get the knowledges of its functions and hardware structures. The next we need to study is its operational instructions. The instructional system of AT89C51 is a simple, easily master, and high efficiency.

The AT89C51 has 111 basic instructions, which includes 49 simple bit instructions, 45 double bit instructions, and 17 three bit instructions, if we distinguish them from the size which they occupy in the program memory. Besides , if we make a difference them in the time which they are executing, we can get the 64 simple period instructions, 45 double period instructions, the more important is that the executing time of divide and multiply operation is four periods. We can also classify them from the function, so there are 28 data transporting instructions, 24 number counting instructions, 25 logic operational instructions, 17 controlling transfered and 17 bit operational instructions.

In the end, we have gotten the technological knowledges of its theory and interface, and we are able to be clear about every portion of microcontroller. Therefore, the next focus is to apply the microcontroller to improve the product,and we should not only ingeniously apply it into manufacturing more perfect and outstanding devices, such as refrigerator, washing machine, air condition, microwave oven and so on, but also inset it into tank, airplane, warship, and other intelligent weapon equipments act. From the above informantions, we can see that there will be a microcontroller’s world in the soon future.

相关主题
相关文档
最新文档