1、外文原文Microcomputer SystemsElectronic systems are used for handing information in the most general sense; this information may be telephone conversation, instrument read or a companys accounts, but in each case the same main type of operation are involved: the processing, storage and transmission of i
2、nformation. in conventional electronic design these operations are combined at the function level; for example a counter, whether electronic or mechanical, stores the current and increments it by one as required. A system such as an electronic clock which employs counters has its storage and process
3、ing capabilities spread throughout the system because each counter is able to store and process numbers. Present day microprocessor based systems depart from this conventional approach by separating the three functions of processing, storage, and transmission into different section of the system. Th
4、is partitioning into three main functions was devised by Von Neumann during the 1940s, and was not conceived especially for microcomputers. Almost every computer ever made has been designed with this structure, and despite the enormous range in their physical forms, they have all been of essentially
5、 the same basic design. In a microprocessor based system the processing will be performed in the microprocessor itself. The storage will be by means of memory circuits and the communication of information into and out of the system will be by means of special input/output I/O circuits. It would be i
6、mpossible to identify a particular piece of hardware which performed the counting in a microprocessor based clock because the time would be stored in the memory and incremented at regular intervals but the microprocessor. However, the software which defined the systems behavior would contain section
7、s that performed as counters. The apparently rather abstract approach to the architecture of the microprocessor and its associated circuits allows it to be very flexible in use, since the system is defined almost entirely software. The design process is largely one of software engineering, and the s
8、imilar problems of construction and maintenance which occur in conventional engineering are encountered when producing software. The figure1.1 illustrates how these three sections within a microcomputer are connected in terms of the communication of information within the machine. The system is cont
9、rolled by the microprocessor which supervises the transfer of information between itself and the memory and input/output sections. The external connections relate to the rest that is, the non-computer part of the engineering system. Fig.1.1 Three Sections of a Typical MicrocomputerAlthough only one
10、storage section has been shown in the diagram, in practice two distinct types of memory RAM and ROM are used. In each case, the word memory is rather inappropriate since a computers memory is more like a filing cabinet in concept; information is stored in a set of numbered boxes and it is referenced
11、 by the serial number of the box in question. Microcomputers use RAM Random Access Memory into which data can be written and from which data can be read again when needed. This data can be read back from the memory in any sequence desired, and not necessarily the same order in which it was written,
12、hence the expression random access memory. Another type of ROM Read Only Memory is used to hold fixed patterns of information which cannot be affected by the microprocessor; these patterns are not lost when power is removed and are normally used to hold the program which defines the behavior of a mi
13、croprocessor based system. ROMs can be read like RAMs, but unlike RAMs they cannot be used to store variable information. Some ROMs have their data patterns put in during manufacture, while others are programmable by the user by means of special equipment and are called programmable ROMs. The widely
14、 used programmable ROMs are erasable by means of special ultraviolet lamps and are referred to as EPROMs, short for Erasable Programmable Read Only Memories. Other new types of device can be erased electrically without the need for ultraviolet light, which are called Electrically Erasable Programmab
15、le Read Only Memories, EEPROMs. The microprocessor processes data under the control of the program, controlling the flow of information to and from memory and input/output devices. Some input/output devices are general-purpose types while others are designed for controlling special hardware such as
16、disc drives or controlling information transmission to other computers. Most types of I/O devices are programmable to some extent, allowing different modes of operation, while some actually contain special-purpose microprocessors to permit quite complex operations to be carried out without directly
17、involving the main microprocessor. The microprocessor processes data under the control of the program, controlling the flow of information to and from memory and input/output devices. Some input/output devices are general-purpose types while others are designed for controlling special hardware such
18、as disc drives or controlling information transmission to other computers. Most types of I/O devices are programmable to some extent, allowing different modes of operation, while some actually contain special-purpose microprocessors to permit quite complex operations to be carried out without direct
19、ly involving the main microprocessor. The microprocessor , memory and input/output circuit may all be contained on the same integrated circuit provided that the application does not require too much program or data storage . This is usually the case in low-cost application such as the controllers us
20、ed in microwave ovens and automatic washing machines . The use of single package allows considerable cost savings to e made when articles are manufactured in large quantities . As technology develops , more and more powerful processors and larger and larger amounts of memory are being incorporated i
21、nto single chip microcomputers with resulting saving in assembly costs in the final products . For the foreseeable future , however , it will continue to be necessary to interconnect a number of integrated circuits to make a microcomputer whenever larger amounts of storage or input/output are requir
22、ed.Another major engineering application of microcomputers is in process control. Here the presence of the microcomputer is usually more apparent to the user because provision is normally made for programming the microcomputer for the particular application. In process control applications the benef
23、its lf fitting the entire system on to single chip are usually outweighed by the high design cost involved, because this sort lf equipment is produced in smaller quantities. Moreover, process controllers are usually more complicated so that it is more difficult to make them as single integrated circ
24、uits. Two approaches are possible; the controller can be implemented as a general-purpose microcomputer rather like a more robust version lf a hobby computer, or as a packaged system, signed for replacing controllers based on older technologies such as electromagnetic relays. In the former case the
25、system would probably be programmed in conventional programming languages such as the ones to9 be introduced later, while in the other case a special-purpose language might be used, for example one which allowed the function of the controller to be described in terms of relay interconnections, In ei
26、ther case programs can be stored in RAM, which allows them to be altered to suit changes in application, but this makes the overall system vulnerable to loss lf power unless batteries are used to ensure continuity of supply. Alternatively programs can be stored in ROM, in which case they virtually b
27、ecome part of the electronic hardware and are often referred to as firmware. More sophisticated process controllers require minicomputers for their implementation, although the use lf large scale integrated circuits the distinction between mini and microcomputers, Products and process controllers of
28、 various kinds represent the majority of present-day microcomputer applications, the exact figures depending on ones interpretation of the word product. Virtually all engineering and scientific uses of microcomputers can be assigned to one or other of these categories. But in the system we most stud
29、y Pressure and Pressure Transmitters. Pressure arises when a force is applied over an area. Provided the force is one Newton and uniformly over the area of one square meters, the pressure has been designated one Pascal. Pressure is a universal processing condition. It is also a condition of life on
30、the planet: we live at the bottom of an atmospheric ocean that extends upward for many miles. This mass of air has weight, and this weight pressing downward causes atmospheric pressure. Water, a fundamental necessity of life, is supplied to most of us under pressure. In the typical process plant, pr
31、essure influences boiling point temperatures, condensing point temperatures, process efficiency, costs, and other important factors. The measurement and control of pressure or lack of it-vacuum-in the typical process plant is critical.The working instruments in the plant usually include simple press
32、ure gauges, precision recorders and indicators, and pneumatic and electronic pressure transmitters. A pressure transmitter makes a pressure measurement and generates either a pneumatic or electrical signal output that is proportional to the pressure being sensed.In the process plant, it is impractic
33、al to locate the control instruments out in the place near the process. It is also true that most measurements are not easily transmitted from some remote location. Pressure measurement is an exception, but if a high pressure of some dangerous chemical is to be indicated or recorded several hundred
34、feet from the point of measurement, a hazard may be from the pressure or from the chemical carried.To eliminate this problem, a signal transmission system was developed. This system is usually either pneumatic or electrical. And control instruments in one location. This makes it practical for a mini
35、mum number of operators to run the plant efficiently.When a pneumatic transmission system is employed, the measurement signal is converted into pneumatic signal by the transmitter scaled from 0 to 100 percent of the measurement value. This transmitter is mounted close to the point of measurement in
36、the process. The transmitter output-air pressure for a pneumatic transmitter-is piped to the recording or control instrument. The standard output range for a pneumatic transmitter is 20 to 100kPa, which is almost universally used.When an electronic pressure transmitter is used, the pressure is conve
37、rted to electrical signal that may be current or voltage. Its standard range is from 4 to 20mA DC for current signal or from 1 to 5V DC for voltage signal. Nowadays, another type of electrical signal, which is becoming common, is the digital or discrete signal. The use of instruments and control sys
38、tems based on computer or forcing increased use of this type of signal.Sometimes it is important for analysis to obtain the parameters that describe the sensor/transmitter behavior. The gain is fairly simple to obtain once the span is known. Consider an electronic pressure transmitter with a range o
39、f 0600kPa.The gain is defined as the change in output divided by the change in input. In this case, the output is electrical signal 420mA DC and the input is process pressure 0600kPa . Thus the gain. Beside we must measure Temperature Temperature measurement is important in industrial control, as di
40、rect indications of system or product state and as indirect indications of such factors as reaction rates, energy flow, turbine efficiency, and lubricant quality. Present temperature scales have been in use for about 200 years, the earliest instruments were based on the thermal expansion of gases an
41、d liquids. Such filled systems are still employed, although many other types of instruments are available. Representative temperature sensors include: filled thermal systems, liquid-in-glass thermometers, thermocouples, resistance temperature detectors, thermostats, bimetallic devices, optical and r
42、adiation pyrometers and temperature-sensitive paints.Advantages of electrical systems include high accuracy and sensitivity, practicality of switching or scanning several measurements points, larger distances possible between measuring elements and controllers, replacement of components rather than
43、complete system , fast response, and ability to measure higher temperature. Among the electrical temperature sensors, thermocouples and resistance temperature detectors are most widely used.Description The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash progr
44、ammable and erasable read only memory PEROM . The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a convention
45、al nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. Function characteristic The AT89C51 provides the fol
46、lowing standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero
47、 frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Power-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions u
48、ntil the next hardware reset. Pin Description VCC:Supply voltage. GND:Ground. Port 0: Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as highimpedance inputs.Port 0 may also be conf
49、igured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups.Port 0 also receives the code bytes during Flash programming,and outputs the code bytes during programverification. External pullups are required during programverification. Port 1 Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written