【正文】
mechanical stomach Lane. It is the entire device, like the human brain plays a role, it goes wrong, the whole device was paralyzed. Now, this MCU has a very wide field of use, such as smart meters, realtime industrial control, munications equipment, navigation systems, and household appliances were using a variety of products once the microcontroller, can serve to upgrade the effectiveness of the product, often In the product name is preceded by the adjective smart, such as washing machines and so intelligent. At present, some technical personnel of factories or other amateur electronics developers to engage in out of certain products, not the circuit is too plex, that is, functions are too simple and easy to be copied. The reason probably lies in the product without the use of a microcontroller or other programmable logic device.SCM is currently permeate all areas of our lives, almost difficult to find which areas there is no trace of microcontrollers. Missiles, navigation devices, inflight control of a variety of instruments, puter network munications and data transmission, industrial automation, realtime process control and data processing, widely used in a variety of smart IC card, civilian luxury cars security system, video machines, cameras, automatic washing machine control, and programcontrolled toys, electronic pets, etc., which are inseparable from the microcontroller. Not to mention the field of robotic automation, intelligent instrumentation, medical devices had. Therefore, the MCU learning, development and applications will be a large number of puter applications and intelligent control of the scientists, engineers.Microcontroller core CPU, CPU formed by the puting device and controller. Arithmetic unit to plete the binary arithmetic / logic operation ponent ALU core, together with registers TMP, accumulator ACC, register B, program status flag register PSW. ACC is an 8 accumulator register, which is the most frequent working CPU registers. Carrying out arithmetic and logical operations, the accumulator ACC are often a temporary one operand before the operation (such as the summand), while the operator then save the results (such as algebra and). Register B is mainly used for multiplication and division operations. Flag register is an 8 PSW register is used to store the results of operations and, if no carry, borrow and so on.Controller is the nerve center of CPU, which includes the timing control logic, instruction registers, decoder, address pointer DPTR and the program counter PC, the stack pointer SP and so on. Here program counter PC is posed of 16bit register counter. Implementation of a program to MCU, you must put the program into memory, according to a preorder a ROM area. When microcontroller action should be taken out of order in an instruction to implement it. Therefore, there must be a circuit where the unit can find instruction address, the circuit is the program counter PC. When the MCU program started when the first instruction to the PC into the host address, which took out one of each instruction (such as multibyte instructions, each took out a mand byte), PC automatically add the contents of one, to point to the next instruction The address, so that instruction can be executed in the order. Only when the program encounters the transfer of instruction, subroutine call instruction, or experience disruption, PC only go to places where needed.A microputer can be defined as a puter having a massproduced integrated circuit microprocessor, such as, for example, the Intel 8086 family of products which presently includes the 8086, 80286, 80386 and 80486 microprocessors. Although the microprocessor is the heart and defining feature of a microputer, it is not very useful unless it is integrated with a memory and a set of input/output (I/O) devices, also known as peripherals. These three classes of devices municate among themselves over a shared set of digital signal lines called a bus. The bus is logically organized into sets of address, data, and control lines. The address lines are for municating device addresses which uniquely identify a particular device on the bus. The data lines are for municating binary data between two bus devices, a bus master, which initiates a data transfer by placing an address on the address lines, and a bus slave, which reads and decodes the address generated by the bus master as its own. The control lines are for coordinating access to the bus and selecting a mode of operation on the bus such as write data or read data modes. For example, if the bus master is a microprocessor and the bus slave is a memory, the microprocessor may direct thememory to be read by placing the proper logic level on a write/read control line. In this way, the microprocessor gains access to the data stored in the memory location specified by the logic levels placed on the address lines by the microprocessor. A bus cycle begins when the bus master directs a write or a read on the bus. The bus cycle is pleted after all data has been transferred across the bus and the bus master releases control of the bus. If the two devices municating with each other over the bus operate at the same speed, then a bus cycle may be achieved over a minimum number of clock cycles. If, on the other hand, a bus device can only transmit or receive data over many clock cycles, then a delay must be injected into the state sequencing of the faster device. In such cases, a ready control line is typically activated by the slower device to indicate to the faster device that data is available on the bus or has been taken from the bus. Buses may be generally classified as synchronous or asynchronous, where synchronous buses are distinguished by the requirement that all bus devices synchronize their use of the bus by a single clock source (or a fundamental frequency). An example of a synchronous bus used in a microputer is the IBM PC AT I/O Channel, ATbus or Industry