1、外文原文:Microprocessors in EngineersThe development of the microprocessor during the 1970s brought about a revolution in engineering design. The industrial revolution at the turn of the nineteenth century heralded the development of the machines which could replace physical drudgery by mechanical means
2、. Apart from a few exceptions, however, these machines required manual supervision because the problem of controlling this mechanical power was not at all straightforward.Many types of automatic control systems have appeared during the twentieth century, based on electronic, mechanical, hydraulic an
3、d fluidic principles. In each case the design techniques have been similar because each component of the system usually contributes a single well defined function to the system behavior.The microprocessor represents a fundamentally different approach to the design of a system. Its physical form is q
4、uite simple and reliable, consisting of a few general-purpose elements which can be programmed to make the system function as required. It is the controlling program which must be designed to give the system the required behavior, and which will contain “components” and “subassemblies” just like any
5、 other kind of engineering. The program, or software, is just of the engineered system as the physical hardware, but it is much less susceptible to failure, provided that it is designed properly.The idea of programmed systems is not new; electronic computers have been in existence for many decades.
6、However, it has taken the development of the large scale integrated circuit-the silicon chip-to produce computers which are cheap, rugged, and reliable enough to be incorporated into engineering designs as components. The techniques of software design are well known to computer scientists and it is
7、not surprising that the principles of good engineering design and “software engineering” are essentially those of good engineering design. We shall see that engineering design using software allows systems to be designed more easily than using more conventional techniques.It is the combination of de
8、velopments in electronic device technology with those in computer technology which has enabled the microprocessor to be produced, and these technologies have “converged” to produce the micro-electronic industry which we see today.More recent developments in integrated circuit technology have led to
9、the introduction of microprocessor small computers fabricated using relatively few integrated circuit components. In fact an entire microprocessor can be made as a single chip. At the heart of any computer is a Central Processing Unit or CPU, and the corresponding heart of the microprocessor is MPU(
10、Micro-Processor Unit), which is simply a CPU implemented on a silicon chip. Its processing power is greater than that of its giant predecessors and yet it is cheap and robust enough to be treated as simply another engineering component.The microprocessor was conceived as a device which could be prog
11、rammed in a very flexible fashion to give almost any desired behavior by means of a list of electronic instructions. Using a microprocessor involves programming skill in producing these lists of instructions as well as more conventional electronic and mechanical design techniques. As its name sugges
12、ts, the microprocessor is organized in much the same way as a conventional computer; indeed, it may be regarded as the “natural” outcome of the “evolution” of the computer from its earliest days.Systems Using MicroprocessorsElectronic systems are used for handling information in the most general sen
13、se; this information may be telephone conversation, instrument reading or a companys accounts, but in each case the same main types of operation are involved: the processing, storage and transmission of information. In conventional electronic design these operations are combined at the function leve
14、l: for example a counter, whether electronic or mechanical, stores the current count and increments it by one as required. A system such as an electronic clock which employs counters has its storage and processing capabilities spread throughout the system because each counter is able to store and pr
15、ocess numbers.Present day microprocessor based systems depart from this conventional approach by separating the three functions of processing, storage, and transmission into different sections of the system. This partitioning into three main functions was devised by Von Neumann during the 1940s, and
16、 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 the same basic design.In a microprocessor based system the processing will be performed i
17、n 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 impossible to identify a particular piece of hardware which performed the counting in a mi
18、croprocessor based clock because the time would be stored in the memory and incremented at regular intervals by the microprocessor. However, the software which defined the systems behavior would contain sections that performed as counters. The apparently rather abstract approach to the architecture
19、of the microprocessor and its associated circuits allows it to be very flexible in use, since the system is defined almost entirely in software. The design process is largely one of software engineering, and the similar problems of construction and maintenance which occur in conventional engineering
20、 are encountered when producing software.How these three sections within a microcomputer are connected in terms of the communication of information within the machine. The system is controlled by the microprocessor which supervises the transfer of information between itself and the memory and input/
21、output sections. The external connections relate to the rest (that is, the non-computer part) of the engineering system.Although only one 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 inappropriat
22、e since a computer memory is more like a filing cabinet in concept ; information is stored in a set of numbered boxes and it is referenced 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 wh
23、en 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, 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 m
24、icroprocessor; these patterns are not lost when power is removed and are normally used to hold the program which defines the behavior of a microprocessor 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 pu
25、t in during manufacture, while others are programmable by the user by means of special equipment and are called programmable ROMs. The widely used programmable ROMs are erasable by means of special ultraviolet lamps and are referred to as EPROMS, short for Erasable Programmable Read Only Memories. O
26、ther new types of device can be erased electrically without the need for ultraviolet light, which are called Electrically Erasable Programmable Read Only Memories, EEPROMS.The microprocessor processes data under the control of the program, controlling the flow of information to and from memory and i
27、nput/output devices. Some input/output devices are general-purpose types while others are designed for controlling special hardware such 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 o
28、peration, while some actually contain special-purpose microprocessors to permit quite complex operations to be carried out without directly involving the main microprocessor.The microprocessor, memory and input/output circuit may all be contained on the same integrated circuit provided that the appl
29、ication does not require too much program or data storage. This is usually the case in low-cost application such as the controllers used in microwave ovens and automatic washing machines. The use of single package allows considerable cost savings to be made when articles are manufactured in large qu
30、antities. As technology develops, more and more powerful processors and larger and larger amounts of memory are being incorporated into 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 i
31、nterconnect a number of integrated circuits to make a microcomputer whenever larger amounts of storage or input/output are required.Another major engineering application of microcomputers is in process control. Here the presence of the microcomputer is usually more apparent to the user because provi
32、sion is normally made for programming the microcomputer for the particular application. In process control applications the benefits of fitting the entire system on to a single chip are usually outweighed by the high design cost involved, because this sort of equipment is produced in smaller quantit
33、ies. Moreover, process controllers are usually more complicated so that it is more difficult to make them as single integrated circuits. Two approaches are possible; the controller can be implemented as a general-purpose microcomputer rather like a more robust version of a hobby computer, or as a pa
34、ckaged system, designed for replacing controllers based on older technologies such as electromagnetic relays. In the former case the system would probably be programmed in conventional programming languages such as the ones to be introduced later, while in the other case a special-purpose language m
35、ight be used, for example one which allowed the function of the controller to be described in terms of relay interconnections. In either 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 of power u
36、nless batteries are used to ensure continuity of supply. Alternatively programs can be stored in ROM, in which case they virtually become part of the electronic hardware and are often referred to as firmware.More sophisticated process controllers require minicomputers for their implementation, altho
37、ugh the use of large scale integrated circuits blurs the distinction between mini- and microcomputers. Products and process controllers of various kinds represent the majority of present-day microcomputer applications, the exact figures depending on ones interpretation of the word product. Virtually
38、 all engineering and scientific uses of microcomputers can be assigned to one or other of these categories. Microcomputer InterfaceA microcomputer interface converts information between two forms. Outside the microcomputer the information handled by an electronic system exists as a physical signal,
39、but within the program, it is represented numerically. The function of any interface can be broken down into a number of operations which modify the data in some way, so that the process of conversion between the external and internal forms is carried out in a number of steps.This can be illustrated
40、 by means of an example such as that of Figure 1, which shows an interface between a microcomputer and a transducer producing a continuously variable analog signal. Transducers often produce very small output requiring amplification, or they may generate signals in a form that needs to be converted
41、again before being handled by the rest of the system. For example, many transducers have variable resistance which must be converted to a voltage by a special circuit. This process of converting the transducer output into a voltage signal which can be connected to the rest of the system is called si
42、gnal conditioning. In the example of Figure .1, the signal conditioning section translates the range of voltage or current signals from the transducer to one which can be converted to digital form by an analog-to-digital converter.An analog-to-digital converter (ADC) is used to convert a continuousl
43、y variable signal to a corresponding digital form which can take any one of a fixed number of possible binary values. If the output of the transducer does not vary continuously, no ADC is necessary. In this case the signal conditioning section must convert the incoming signal to a form which can be
44、connected directly to the next part of the interface, the input/output section of the microcomputer itself.The I/O section converts digital on/off voltage signals to a form which can be presented to the processor via the system buses. Here the state of each input line, whether it is “on” or “off”, i
45、s indicated by a corresponding “1” or “0”. In the analog inputs which have been converted to digital form, the patterns of ones and zeros in the internal representation will form binary numbers corresponding to the quantity being converted.The raw numbers from the interface are limited by the design
46、 of the interface circuitry and they often require converter and scaling to produce values suitable for use in the main program. For example, the interface might be used to convert temperatures in the range-20 to +50 degrees, but the numbers produced by an 8-bit converter will lie in the range 0 to
47、255. Obviously it is easier from the programmers point of view to deal directly with temperature rather than to work out the equivalent of any given temperature in terms of the numbers produced by the ADC. Every time the interface is used to read a transducer, the same operations must be carried out
48、 to convert the input number into a more convenient form. Additionally, the operation of some interfaces requires control signals to be passed between the microcomputer and components of the interface. For these reasons it is normal to use a subroutine to look after the detailed operation of the int
49、erface and carry out any scaling and/or converter which might be needed.Output interfaces take a similar form (Fig.2), the obvious difference being that here the flow of information is in the opposite direction; it is passed from the program to the outside world. In this case the program may call an output subroutine which supervises the operation of the interface and performs the scaling numbers which may be needed for a digital-to-analog converter (DAC). This subroutine passes information i