版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、微型计算机控制系统(单片机控制系统)广义地说,微型计算机控制系统(单片机控制系统)是用于处理信息的,这种被用于处理的信息可以是电话交谈,也可以是仪器的读数或者是一个企业的帐户,但是各种情况下都涉及到相同的主要操作:信息的处理、信息的存储和信息的传递。在常规的电子设计中,这些操作都是以功能平台方式组合起来的,例如计数器,无论是电子计数器还是机械计数器,都要存储当前的数值,并且按要求将该数值增加1。一个系统例如采用计数器的电子钟之类的任一系统要使其存储和处理能力遍布整个系统,因为每个计数器都能存储和处理一些数字。现如今,以微处理器为基础的系统从常规的处理方法中分离了出来,它将信息的处理,信息的存储
2、和信息的传输三个功能分离形成不同的系统单元。这种主要将系统分成三个主要单元的分离方法是冯-诺依曼在20世纪40年代所设想出来的,并且是针对微计算机的设想。从此以后基本上所有制成的计算机都是用这种结构设计的,尽管他们包含着宽广的物理形式与物理结构,但从根本上来说他们均是具有相同基本设计的计算机。在以微处理器为基础的系统中,处理是由以微处理器为基础的系统自身完成的。存储是利用存储器电路,而从系统中输入和输出的信息传输则是利用特定的输入/输出(i/o)电路。要在一个以微处理器为基础的时钟中找出执行具有计数功能的一个特殊的硬件组成部分是不可能的,因为时间存储在存储器中,而在固定的时间间隔下由微处理器控
3、制增值。但是,规定系统运转过程的软件却规定了包含实现计数器计数功能的单元部分。由于系统几乎完全由软件所定义,所以对微处理器结构和其辅助电路这种看起来非常抽象的处理方法使其在应用时非常灵活。这种设计过程主要是软件工程,而且在生产软件时,就会遇到产生于常规工程中相似的构造和维护问题。 图1.1 微型计算机的三个组成部分图1.1显示出了微型计算机中这三个单元在一个微处理器控制系统中是如何按照机器中的信息通信方式而联接起来的。该系统由微处理器控制,微处理器能够对其自身的存储器和输入/输出单元的信息传输进行管理。外部的连接部分与工程系统中的其余部分(即非计算机部分)有关。尽管图中显示的只有一个存储单元,
4、但是在实际中却有ram和rom两种不同的存储器被使用。在每一种情况下,由于概念上的计算机存储器更像一个公文柜,上述的“存储器”一词是非常不恰当的;信息被存放在一系列已数字标记过的的“箱子”中,而且可以按照问题由“箱子”的序列号进行相关信息的参考定位。微计算机控制系统经常使用ram(随机存取存储器),在ram中,数据可以被写入,并且在需要的时候,可以被再次读出。这种数据能以任意一种所希望的次序从存储器中读出,而不必按照写入时的相同次序读出,所以有“随机”存取存储器。另一类型rom(只读存储器)是用来保持信息的,它们是不受微处理器影响的固定的信息标本;这些信息在电源切断后不会丢失,并通常用来保存规
5、定微处理器化系统运转过程的程序。rom可像ram一样被读取,但与ram不一样的是不能用来存储可变的信息。有些rom在制造时将其数据标本放入,而另外的则可通过特殊的设备由用户编程,所以称为可编程rom。被广泛使用的可编程rom可利用特殊紫外线灯察除,并被成为eprom,即可察除可编程只读存储器的缩写。另有新类型的期器件不必用紫外线灯而用电察除,所以称为电可察除可编程只读存储器eeprom。 微处理器在程序控制下处理数据,并控制流向和来自存储器和输入/输出装置的信息流。有些输入/输出装置是通用型的,而另外一些则是设计来控制如磁盘驱动器的特殊硬件,或控制传给其他计算机的信息传输。大多数类型的i/o装
6、置在某种程度下可编程,允许不同形式的操作,而有些则包含特殊用途微处理器的i/o装置不用主微处理器的直接干预,就可实施非常复杂的操作。 假如应用中不需要太多的程序和数据存储量,微处理器、存储器和输入/输出可全被包含在同一集成电路中。这通常是低成本应用情况,例如用于微波炉和自动洗衣机的控制器。当商品被大量地生产时,这种单一芯片的使用就可节省相当大的成本。当技术进一步发展,更强更强的处理器和更大更大数量的存储器被包含形成单片微型计算机,结果使最终产品的装配成本得以节省。但是在可预见的未来,当需要大量的存储器或输入/输出时,还是有必要继续将许多集成电路相互联结起来,形成微计算机。 微计算机的另一主要工
7、程应用是在过程控制中。这是,由于装置是按特定的应用情况由微机编程实现的,对用户来说微计算机的存在通常就更加明显。在过程控制应用中,由于这种设备以较少的数量生产,将整个系统安装在单个芯片上所获取的利益常比不上所涉及的高设计成本。而且,过程控制器通常更为复杂,所以要将他们做成单独的集成电路就更为困难。可采用两种处理,将控制器做成一种通用的微计算机,正像较强版本的业余计算机那样;或者做成“包裹”式系统,按照像电磁继电器那样的较老式的技术进行设计,来取代控制器。对前一种情况,系统可以用常规的编程语言来编程,正如以后要介绍的语言那样;而另一种情况,可采用特殊用途的语言,例如那种使控制器功能按照继电器相互
8、连接的方法进行描述。两种情况下,序均能存于ram,这让程序能按应用情况变化时进行相应的变化,但是这使得总系统易受掉电影响而工作不正常,除非使用电池保证供电连续性。另一种选择是将程序在rom中,这样他们就变成电子“硬件”的一部分并常被称为“固件”。 尽管大规模集成电路的应用使小型和微型计算机的差别变得“模糊”,更复杂的过程控制器需要小型计算机实现他们的过程。各种类型的产品和过程控制器代表了当今微计算机应用的广泛性,而具体的结构取决于对“产品”一词的解释。实际上,计算机的所有工程和科学上的应用都能指定来进行这些种类的某一或某些工作。而在本设计中压力和压力变送器当某一力加到某一面积上,就形成压力,假
9、如这力是1牛顿均匀地加在1平方米的面积上,这压力被定义为1帕斯卡。压力是一种普遍的工艺状态,它也是这个星球上的一个生活条件:我们生活在向上延伸许多英里的大气海洋的底部。空气物质是有重量的,而且这种下压的重量形成大气压。水,是生活的必需品,也是在压力之下提供给我们中的大多数人。在典型的过程工厂中,压力影响沸点温度、凝固点温度、过程效率、消耗和其他重要因数。压力的测量和控制,或者压力的不足真空,在典型的过程控制中是极为重要的。工厂中的工作仪器通常包括压力计、精密纪录仪、以及气动和电动的压力变送器。压力变送器实现压力测量并产生正比于所传感压力的气动或电信号输出。在过程工厂中,将控制仪表远远放在过程的
10、附近是不现实的,并且大多数测量是不容易从远处传来的。压力测量是一个例外,但是,如果要离测量点几百英尺外指示或记录某种危险化学品的高压,就会有来自这个压力所载的化学品所引发的危险。为了消除这一问题,开发了一种信号传输系统。这种系统常常可是气动或者电动的。使用这种系统,就可以在某一地点安装大多数的指示、记录和控制仪器。这也是最少数量的操作者有效的运行工厂成为现实。当使用气动传送系统时,测量信号就由变送器将比例为0%100%的测量值转换为气动信号。变送器安装在靠近过程中的测量点上。变送器输出对气动变送器是输出压力通过管道传给记录或控制仪表。气动变送器的标准输出范围是20100kpa,这信号几乎在全球
11、使用。当使用电子压力变送器时,压力就被转换成电流或电压形式的电信号。其标准范围对电流来说是420ma dc,对电压信号来说是15v dc。当今,另一种电信号形式变的越来越常用,就是数字或离散信号。基于计算机或微处理器的仪器或控制系统的应用正推动这类信号的应用不断增加。有时,分析获取描述传感器/变送器特性的参数是很重要的。当量程已知,去获取增益就非常简单。假定电子压力传感器的量程为0600kpa,增益定义为输出变化除以输入变化。这里,输出的电信号(420ma dc),而输入的过程压力(0600kpa),这样增益就为:此外我们在本设计中还必须对温度进行测量,温度测量在工业控制中是很重要的,因为它作
12、为系统或产品状态的直接指标,或者作为如反应率、能量流、涡轮机效率和润滑质量等间接指标。现行的温度分度已使用了约200年,最初的仪器是基于气体和液体的热膨胀。现在尽管有许多其他类型的仪器在使用,这些填充式系统仍常用于直接的温度测量。有代表性的温度传感器包括:填充式热系统、玻璃液体温度计、热电偶、电阻温度探测器、热敏电阻、双金属器件、光学和辐射高温计和热敏涂料。电气系统的优点包括高的精度和灵敏度,能实现开关切换或扫描多个测量点,可在测量元件和控制器之间长距离传输,出现事故时可调换元件,快速响应,以及具有测量高温的能力。其中热电偶和电阻温度探测器则被最广泛的使用。说明 该at89c51是一种低功耗,
13、高性能cmos 8位4k的闪存可编程和可擦除只读存储器(perom)字节的微型计算机。该设备是采用atmel的高密度非易失性内存技术,并与行业标准的mcs - 51指令集和引脚兼容。片上闪存程序存储器可以编程就可以在系统或由传统的非易失性存储器编程。通过将集成在一个芯片上通用的8位闪存的cpu,atmel的at89c51是一个强大的微型计算机提供了一个高度灵活和成本有效的解决方案为许多嵌入式控制应用。 功能特点 at89s51内提供了以下标准特性:4k字节闪存,128字节ram,32个i / o线,两个16位定时器/计数器,一个五向量两级中断结构,一个全双工串行口,片上振荡器和时钟电路。此外,
14、at89c51是静态逻辑设计与操作频率下降到零,并支持两种软件可选的节电模式。空闲模式时cpu停止工作,而ram,定时/计数器,串行口和中断系统继续工作。掉电模式保存ram的内容,但冻结振荡器关闭,直到下一个硬件复位芯片其它功能。 引脚说明 vcc:电源电压。 接地:接地。p0口:p0口为一个8位漏级开路双向i/o口,每脚可吸收8ttl门电流。当p0口的管脚第一次写1时,被定义为高阻输入。p0能够用于外部程序数据存储器,它可以被定义为数据/地址的第八位。在fiash编程时,p0 口作为原码输入口,当fiash进行校验时,p0输出原码,此时p0外部必须被拉高。 p1口:p1口是一个内部提供上拉电
15、阻的8位双向i/o口,p1口缓冲器能接收输出4ttl门电流。p1口管脚写入1后,被内部上拉为高,可用作输入,p1口被外部下拉为低电平时,将输出电流,这是由于内部上拉的缘故。在flash编程和校验时,p1口作为第八位地址接收。 p2口:p2口为一个内部上拉电阻的8位双向i/o口,p2口缓冲器可接收,输出4个ttl门电流,当p2口被写“1”时,其管脚被内部上拉电阻拉高,且作为输入。并因此作为输入时,p2口的管脚被外部拉低,将输出电流。这是由于内部上拉的缘故。p2口当用于外部程序存储器或16位地址外部数据存储器进行存取时,p2口输出地址的高八位。在给出地址“1”时,它利用内部上拉优势,当对外部八位地
16、址数据存储器进行读写时,p2口输出其特殊功能寄存器的内容。p2口在flash编程和校验时接收高八位地址信号和控制信号。p3口:p3口管脚是8个带内部上拉电阻的双向i/o口,可接收输出4个ttl门电流。当p3口写入“1”后,它们被内部上拉为高电平,并用作输入。作为输入,由于外部下拉为低电平,p3口将输出电流(ill)这是由于上拉的缘故。rst 复位输入。此管脚上出现两个机器周期的高电平,而振荡器运行将使器件复位。 进修/编 地址锁存使能锁存在访问外部存储器地址的低字节输出脉冲。该引脚也是在flash编程脉冲输入programming.in正常运行的ale(编)是在1 / 6振荡器频率恒定的速率发
17、射,并可能对外部定时或时钟的用途。请注意,但是,一个ale脉冲被跳过在每次访问外部数据存储器。 如果需要时,ale操作可以通过设置位sfr的位置8eh 0。随着位设置,ale为活跃,只有在执行movx或movc指令。否则,脚弱拉高。设置的ale -禁用位微控制器没有影响,如果在外部执行模式。ale/prog:当访问外部存储器时,地址锁存允许的输出电平用于锁存地址的地位字节。在flash编程期间,此引脚用于输入编程脉冲。在平时,ale端以不变的频率周期输出正脉冲信号,此频率为振荡器频率的1/6。因此它可用作对外部输出的脉冲或用于定时目的。然而要注意的是:每当用作外部数据存储器时,将跳过一个ale
18、脉冲。如想禁止ale的输出可在sfr8eh地址上置0。此时,ale只有在执行movx,movc指令是ale才起作用。另外,该引脚被略微拉高。如果微处理器在外部执行状态ale禁止,置位无效。psen:外部程序存储器的选通信号。在由外部程序存储器取指期间,每个机器周期两次/psen有效。但在访问外部数据存储器时,这两次有效的/psen信号将不出现。ea/vpp:当/ea保持低电平时,则在此期间外部程序存储器(0000h-ffffh),不管是否有内部程序存储器。注意加密方式1时,/ea将内部锁定为reset;当/ea端保持高电平时,此间内部程序存储器。在flash编程期间,此引脚也用于施加12v编程
19、电源(vpp)。xtal1:反向振荡放大器的输入及内部时钟工作电路的输入。xtal2:来自反向振荡器的输出。振荡器特性:xtal1和xtal2分别为反向放大器的输入和输出。该反向放大器可以配置为片内振荡器。石晶振荡和陶瓷振荡均可采用。如采用外部时钟源驱动器件,xtal2应不接。有余输入至内部时钟信号要通过一个二分频触发器,因此对外部时钟信号的脉宽无任何要求,但必须保证脉冲的高低电平要求的宽度。microcomputer systemselectronic systems are used for handing information in the most general sense; th
20、is 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 information. in conventional electronic design these operations are combined at the function level; for exa
21、mple 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 processing capabilities spread throughout the system because each counter is able to store and process numbers. p
22、resent 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. this partitioning into three main functions was devised by von neumann during the 1940s, and was not conceiv
23、ed 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 microproc
24、essor 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 bas
25、ed 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 sections that performed as counters. the apparently rather abstract approach to the architecture of the micropro
26、cessor 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 similar problems of construction and maintenance which occur in conventional engineering are encountered w
27、hen 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 controlled by the microprocessor which supervises the transfer of information between itself and the memory a
28、nd 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 storage section has been shown in the diagram, in practice two distinct types of memory ram and rom are
29、 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 by the serial number of the box in question. microcomputers use ram (random access memory) into which
30、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 fix
31、ed 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
32、 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 e
33、proms, 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,
34、 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 a
35、re 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 processes data under the control of the progr
36、am, 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 device
37、s 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
38、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 considerabl
39、e 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 into single chip microcomputers with resulting saving in assembly costs in the final products . for
40、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
41、 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 lf fitting the entire system on to single chip are usually outweighed by the high design cost i
42、nvolved, 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 circuits. two approaches are possible; the controller can be implemented as a general-purpose microcomp
43、uter 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 system would probably be programmed in conventional programming languages such as the ones to9 be i
44、ntroduced 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 applica
45、tion, 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 become part of the electronic hardware and are often referred to as firmware. more sophisticated pro
46、cess 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 various kinds represent the majority of present-day microcomputer applications, the exact figures
47、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 study pressure and pressure transmitters. pressure arises when a force is applied over an area. provide
48、d 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 the planet: we live at the bottom of an atmospheric ocean that extends upward for many miles. this
49、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, pressure influences boiling point temperatures, condensing point temperatures, process efficiency, co
50、sts, 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 pressure gauges, precision recorders and indicators, and pneumatic and electronic pressure transmitters.
51、 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 impractical to locate the control instruments out in the place near the process. it is also true that most m
52、easurements 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 feet from the point of measurement, a hazard may be from the pressure or from the chemical carried.
53、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 minimum number of operators to run the plant efficiently.when a pneumatic transmission system is employ
54、ed, 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 the process. the transmitter output-air pressure for a pneumatic transmitter-is piped to the record
55、ing 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 converted to electrical signal that may be current or voltage. its standard range is from 4 to 20ma dc f
56、or 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 systems based on computer or forcing increased use of this type of signal.sometimes it is important fo
57、r 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 of 0600kpa.the gain is defined as the change in output divided by the change in input. in this case,
58、 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 direct indications of system or product state and as indirect indications of such factors as react
59、ion 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 and liquids. such filled systems are still employed, although many other types of instruments are available. representative temperature sensors include: filled thermal systems, liquid-in-
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2020年国家开放大学电大《数据结构》实验报告
- 工民建施工的工序质量控制的措施及意义的探讨
- XXX市大型体育中心建设项目可行性研究报告
- 石河子大学《食用菌资源学》2022-2023学年第一学期期末试卷
- 石河子大学《复变函数与积分变换》2021-2022学年第一学期期末试卷
- 沈阳理工大学《自然辩证法概论》2022-2023学年第一学期期末试卷
- 沈阳理工大学《金属热处理》2022-2023学年第一学期期末试卷
- 2018年四川内江中考满分作文《我心中的英雄》14
- 沈阳理工大学《化工过程模拟》2023-2024学年第一学期期末试卷
- 沈阳理工大学《电力拖动直流控制系统》2021-2022学年期末试卷
- 有效作业课件
- 水泥生产工艺流程及过程控制培训课件
- 外科护理学试题+答案
- 《幼儿园家园共育研究开题报告(含提纲)》
- 《中医推拿按摩》课件
- 国家5A景区创建简介课件
- 小学科学苏教版《我们的大脑》教学课件
- 样板间装修方案
- 事业单位人事管理条例完整版x课件
- 河北省衡水市各县区乡镇行政村村庄村名居民村民委员会明细
- 教师对幼儿园管理工作的满意度调查问卷
评论
0/150
提交评论