喜歡這套資料就充值下載吧。。。資源目錄里展示的都可在線預(yù)覽哦。。。下載后都有,,請(qǐng)放心下載,,文件全都包含在內(nèi),,【有疑問(wèn)咨詢(xún)QQ:1064457796 或 1304139763】
徐州工程學(xué)院畢業(yè)設(shè)計(jì)(論文)
附錄
附錄1
英文翻譯
Microprocessors in Engineers
The 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. 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 and 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 quite 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 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. 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 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 developments 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 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(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 programmed 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 suggests, 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 Microprocessors
Electronic systems are used for handling information in the most general sense; this information may be telephone conversation, instrument reading or a company's 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 level: 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 process 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 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 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 impossible 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 by the microprocessor. However, the software which defined the system's behavior would contain sections 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 in software. The design process is largely one of software engineering, and the similar problems of construction and maintenance which occur in conventional engineering 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/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 inappropriate 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 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, 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 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 put 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. Other 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 input/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 operation, 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 application 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 quantities. 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 interconnect 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 provision 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 quantities. 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 'packaged' 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 might 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 unless 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, although 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 one’s interpretation of the word 'product'. Virtually all engineering and scientific uses of microcomputers can be assigned to one or other of these categories.
Microcomputer Interface
A microcomputer interface converts information between two forms. Outside the microcomputer the information handled by an electronic system exists as a physical signal, 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 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 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 signal 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 continuously 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 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”, is 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 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 255. Obviously it is easier from the programmer's 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 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 interface 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 in turn to an output device which produces a corresponding electrical signal, which could be converted into analog form using a DAC. Finally the signal is conditioned (usually amplified) to a form suitable for operating an actuator.
Digital Interface Circuits
The signals used within microcomputer circuits are almost always too small to be connected directly to the "outside world" and some kind of interface must be used to translate them to a more appropriate form. The design of section of interface circuits is one of the most important tasks facing the engineer wishing to apply microcomputers. We have seen that in microcomputers information is represented as discrete patterns of bits; this digital form is most useful when the microcomputer is to be connected to equipment which can only be switched on or off, where each bit might represent the state of a switch or actuator.
Care must be taken when connecting logic circuits to ensure that their logic levels and current ratings are compatible. The output voltages produced by a logic circuit are normally specified in terms of worst case values when sourcing or sinking the maximum rated currents. Thus VOH is the guaranteed minimum "high" voltage when sourcing the maximum rated "high" output current IOH, while VOL is the guaranteed minimum "low" output voltage when sinking the maximum rated "low" output current IOL. There are corresponding specifications for logic inputs which specify the minimum input voltage which will be recognized as a logic "high" state VIH, and the maximum input voltage which will be regarded as a logic "low" state VIL.
For input interface, perhaps the main problem facing the designer is that of electrical noise. Small noise signals may cause the system to malfunction, while larger amounts of noise can permanently damage it. The designer must be aware of these dangers from the outset. There are many methods to protect interface circuits and microcomputer from various hinds of noise. Following are some examples:
1. Input and output electrical isolation between the microcomputer system and external devices using an opt-isolator or a transformer.
2. Removing high frequency noise pulses by a low pass filter and Schmitt-trigger.
3. Protecting against excessive input voltages using a pair of diodes to power supply reversibly biased in normal direction,
For output interface, parameters VOH, VOL, IOH and IOL of a logic device are usually much to low to allow loads to he connected directly, and in practice an external circuit must be connected to amplify the current and voltage to drive a load. Although several types of semiconductor devices are now available for controlling DC and AC powers up to many kilowatts, there are two basic ways in which a switch can be connected to a load to control it; series connection and shunt connection as shown in Figure 3.
With series connection, the switch allows current to flow through the load when closed, while with shunt connection dosing the switch allows current to bypass the load. Both connections are useful in low power circuits, but only the series connection can used in high-power circuits because of the power wasted in the series resistor R.
中文翻譯
工程中的單片機(jī)
20世紀(jì)70年代的單片機(jī)發(fā)展引起了工程設(shè)計(jì)的一場(chǎng)革命。在19世紀(jì)之初的工業(yè)革命宣布了用機(jī)械工具代替繁重的體力勞動(dòng)的時(shí),機(jī)器得到了大力發(fā)展。但有少數(shù)例外,這些機(jī)器需要人的操作監(jiān)管,這是因?yàn)榭刂七@種機(jī)械動(dòng)力的問(wèn)題并不都是簡(jiǎn)明的。
在20世紀(jì),出現(xiàn)了許多種基于電子、機(jī)械、液壓和流體原理的自動(dòng)控制系統(tǒng)。由于系統(tǒng)中的每一元件通常對(duì)系統(tǒng)的運(yùn)轉(zhuǎn)狀態(tài)只起單一確定的功能,各種類(lèi)型系統(tǒng)的設(shè)計(jì)技術(shù)是相似的。
單片機(jī)代表了一種根本不同的系統(tǒng)設(shè)計(jì)方法 。其物理形式是非常簡(jiǎn)單可靠的,包括一些通用元件,通過(guò)編程取得所需的系統(tǒng)功能。控制程序的設(shè)計(jì)必須給予系統(tǒng)所需的功能作用,它應(yīng)像其他工程類(lèi)型一樣包含“元件”和“組件”。程序或軟件,如同物理硬件形成的工程系統(tǒng),但如果設(shè)計(jì)正確(得法),是不易出問(wèn)題的。
可編程系統(tǒng)的設(shè)想并非新鮮,電子計(jì)算機(jī)已使用了幾十年。但是,它的應(yīng)用得益于大規(guī)模集成電路-----硅片的發(fā)展,從而使生產(chǎn)的計(jì)算機(jī)變得足夠的便宜、耐用且可靠,能夠以部件的形式綜合到工程設(shè)計(jì)中。軟件設(shè)計(jì)技術(shù)對(duì)計(jì)算機(jī)科學(xué)家來(lái)說(shuō)已是十分清楚的,而且并不奇怪好的工程設(shè)計(jì)和“軟件工程”是好的工程設(shè)計(jì)的基本條件,我們將會(huì)看到使用軟件的工程設(shè)計(jì)使系統(tǒng)設(shè)計(jì)比使用更常規(guī)的方法更為方便。
正是由于電子器件技術(shù)的發(fā)展和計(jì)算機(jī)技術(shù)發(fā)展的綜合產(chǎn)生了單片機(jī)。這些技術(shù)“會(huì)集起來(lái)” 形成了我們今天看到的微電子工業(yè)。
集成電路技術(shù)的更新發(fā)展促使了單片機(jī)的出現(xiàn),也就是用相對(duì)少量的集成電路元件構(gòu)成了小計(jì)算機(jī)。事實(shí)上完整的計(jì)算機(jī)可用一個(gè)芯片做出。在任意計(jì)算機(jī)中,其核心是中央處理單元或CPU,而微型計(jì)算機(jī)的核心是微處理器或MPU(Micro-Processor Unit),它是用一個(gè)硅片制成的CPU。它的處理能力比早先的巨大芯片還要強(qiáng),并且對(duì)僅僅作為另一種工程部件來(lái)說(shuō),已足夠強(qiáng)大。
微型計(jì)算機(jī)被設(shè)想為能以非常靈活的方式進(jìn)行編程的裝置,通過(guò)一組電子指令清單就能給出幾乎任何所希望的功效。使用計(jì)算機(jī)會(huì)涉及在生成指令清單時(shí)的編程技巧以及常用的電子和機(jī)械設(shè)計(jì)技術(shù)。正如其名字所指示的,微型計(jì)算機(jī)以常用計(jì)算機(jī)十分相同的方法組成;事實(shí)上,它可看作是從最早的計(jì)算機(jī)“進(jìn)化”的“自然”結(jié)果。
廣義地說(shuō),電子系統(tǒng)是用于處理信息的,這種信息可以是電話交談、儀器讀數(shù)或企業(yè)信息,但是各種情況下都涉及相同的主要操作:信息處理、存儲(chǔ)和傳送。在常規(guī)的電子設(shè)計(jì)中,這些操作都是以功能平臺(tái)方式組合起來(lái)的,例如計(jì)數(shù)器,無(wú)論是電子還是機(jī)械的,都要存儲(chǔ)當(dāng)前值,并按要求將該值增1。諸如采用計(jì)數(shù)器的電子鐘之類(lèi)的任一系統(tǒng)要使其存儲(chǔ)和處理能力遍布整個(gè)系統(tǒng),因?yàn)槊總€(gè)計(jì)數(shù)器都能存儲(chǔ)和處理一些數(shù)字。
當(dāng)前微處理器化系統(tǒng)與上述的常規(guī)方法不同,它將處理、存儲(chǔ)和傳輸三個(gè)功能分離形成不同的系統(tǒng)單元。這種形成三個(gè)主要單元的分離方法是馮·諾依曼在20世紀(jì)40年代所設(shè)想出來(lái)的,并且是針對(duì)微計(jì)算機(jī)的設(shè)想。從此幾乎所有制成的計(jì)算機(jī)都是用這種結(jié)構(gòu)設(shè)計(jì)的,盡管包含寬廣的物理形式,從根本上來(lái)說(shuō)它們均是具有相同的基本設(shè)計(jì)。
在微處理器化系統(tǒng)中,處理是由微處理器本身完成的。存儲(chǔ)是利用存儲(chǔ)器電路,而進(jìn)入和出自系統(tǒng)的信息傳輸則是利用特定的輸入/輸出(I/0)電路。要在一個(gè)微處理器化時(shí)鐘中找出執(zhí)行計(jì)數(shù)功能的一個(gè)特殊硬件是不可能的,因?yàn)闀r(shí)間存儲(chǔ)在存儲(chǔ)器中,而在固定的時(shí)間間隔下由微處理器控制增值。但是,規(guī)定系統(tǒng)運(yùn)轉(zhuǎn)過(guò)程的軟件包含實(shí)現(xiàn)計(jì)數(shù)器功能的單元。由于系統(tǒng)幾乎完全由軟件所定義,所以對(duì)微處理器結(jié)構(gòu)和其輔助電路這種看起來(lái)非常抽象的處理方法使其在應(yīng)用時(shí)非常靈活。這種設(shè)計(jì)過(guò)程主要是軟件工程,而且在生產(chǎn)軟件時(shí),就會(huì)遇到產(chǎn)生于常規(guī)工程中相似的構(gòu)造和維護(hù)問(wèn)題。
微型計(jì)算機(jī)中這三個(gè)單元是如何按照機(jī)器中的信息通信方式而聯(lián)起來(lái)的。該系統(tǒng)由微處理器控制,它管理自己與存儲(chǔ)器和輸入/輸出單元的信息傳輸。外部的連接與工程系統(tǒng)的其余部分(即非計(jì)算機(jī)部分)有關(guān)。
盡管圖中顯示的只有一個(gè)存儲(chǔ)單元,實(shí)際中有RAM和ROM兩種不同的存儲(chǔ)器被使用。由于概念上的計(jì)算機(jī)存儲(chǔ)器更像一個(gè)公文柜,上述的“存儲(chǔ)器”一詞是非常不恰當(dāng)?shù)?;信息存放在一系列已?biāo)號(hào)的“箱子”中,而且可按