基于单片机的交通灯设计大学毕业论文英文文献翻译及原文
- 格式:doc
- 大小:110.00 KB
- 文档页数:17
衡水学院毕业设计基于单片机的交通灯设计毕业设计学术承诺本人郑重承诺:所呈交的毕业论文是本人在导师指导下进行的研究工作及取得的研究成果。
除了文中特别加以标注和致谢的地方外,论文中不存在抄袭情况,论文中不包含其他人已经发表的研究成果,也不包含他人或其他教学机构取得的研究成果。
作者签名:日期:毕业设计使用授权的说明本人了解并遵守衡水学院有关保留、使用毕业论文的规定。
即:学校有权保留或向有关部门送交毕业论文的原件或复印件,允许论文被查阅和借阅;学校可以公开论文的全部或部分内容,可以采用影印、缩印或其他复制手段保存论文及相关资料。
作者签名:指导教师签名:日期:日期:设计题目:基于单片机的交通灯设计摘要:当今时代是一个自动化时代,交通灯控制等很多行业的设备都与计算机密切相关。
因此,一个好的交通灯控制系统,将在道路拥挤等交通状况方面给予技术革新。
本文主要介绍了一个基于89C52单片机的交通灯控制系统,详细介绍了利用89C52设计并仿真实现交通灯控制系统的过程,重点对硬件设计、软件编程、调试分析以及各模块系统流程进行了详细分析,对各部分的电路也一一进行了介绍。
本电路由89C52单片机、按键、数码管和LED灯组成,并在Protues软件上实现仿真。
关键词:交通控制;单片机;89C52ITitle:Design of Traffic Light Based on MCUAbstract: The ages is an automation ages nowadays and traffic light control's waiting a lot of equipments of professions is closely related with calculator. Therefore, a good traffic light control system will hustle for road, give technique innovation. This paper describes a 80C52 microcontroller-based traffic light control system, detailed description of the use 89C52 development process of the traffic light control system. Focus on a detailed analysis of the hardware design, software programming, analysis and debugging process of the modular system, on the part of the circuit are introduced one by one. The circuit is made up of 80C52 microcomputer, keyboard ,digital tube and LED lamp display and realize simulation in the Protues software.Keywords:Traffic Control; Single Chip Microcomputer ;89C52II目录摘要 (I)Abstract (II)1绪论 (5)1.1交通灯的发展历史及研究意义 (5)1.2我国当前的交通现状 (6)1.3本课题的主要研究工作 (6)2设计方案 (7)2.1 系统机构总框架 (7)2.1.1 自动控制方式 (7)2.1.2 人工控制方式 (8)2.2 交通管理的方案论证 (10)2.3 系统电路框图 (10)2.4 电路的工作原理 (11)3 硬件设计 (12)3.1 MCS-51单片机简介 (12)3.1.1 单片机的内部结构 (12)3.1.2单片机应用系统 (13)3.1.3单片机的发展趋势 (14)3.2 系统电路 (14)3.2.1 最小系统模块 (15)3.2.2 LED显示模块 (15)3.2.3 数码管显示模块 (16)3.2.4 按键控制模块 (17)3.2.5 驱动模块 (17)4 软件设计 (19)4.1 主程序流程图 (19)4.2子程序流程控制 (20)4.2.1 自动控制模式程序 (20)4.2.2人工控制模式程序 (20)4.2.3键盘扫描程序 (21)4.2.4 数码管中断显示程序 (22)4.2.5 定时器T1子程序 (23)5 调试分析 (24)5.1 proteus软件简介 (25)5.2 proteus仿真图 (25)5.2.1 自动控制仿真 (26)5.2.2 人工控制仿真 (28)结语 (29)III参考文献 (30)致谢 (32)附录1 (33)IV1绪论1.1交通灯的发展历史及研究意义早在1850年,城市交叉口处不断增长的交通就引发了人们对安全和拥堵的关注。
毕业设计(论文)外文文献翻译文献、资料中文题目:基于单片机的交通灯控制系统文献、资料英文题目:Structure and functionof the MCS-51 series文献、资料来源:文献、资料发表(出版)日期:院(部):专业:通信工程班级:姓名:学号:指导教师:翻译日期: 2017.02.14毕业设计文献资料翻译(原文及译文)原文名称:Structure and function of the MCS-51 series课题名称:基于单片机的交通灯控制系统Structure and function of the MCS-51 seriesStructure and function of the MCS-51 series one-chip computer MCS-51 is a name of a piece of one-chip computer series which Intel Company produces. This company introduced 8 top-grade one-chip computers of MCS-51 series in 1980 after introducing 8 one-chip computers of MCS-48 series in 1976. It belong to a lot of kinds this lineof one-chip computer the chips have, such as 8051, 8031, 8751, 80C51BH, 80C31BH,etc., their basic composition, basic performance and instruction system are all the same.8051 daily representatives-51 serial one-chip computers.A one-chip computer system is made up of several following parts:(1) One microprocessor of 8 (CPU). ( 2) At slice data memory RAM (128B/256B),it use not depositing not can reading /data that write, such as result not middle of operation, final result and data wanted to show, etc.(3) Procedure memory ROM/EPROM (4KB/8KB ), is used to preserve the procedure , some initial data and form in slice. But does not take ROM/EPROM within some one-chip computers, such as 8031, 8032.(4) Four 8 run side by side I/O interface P0 four P3, each mouth can use as introduction , may use as exporting too. (5) Two timer / counter, each timer / counter may set up and count in the way, used to count to the external incident, can set up into a timing way too, and can according to count or result of timing realize the control of the computer. (6) Five cut off cutting off the control system of the source. (7) One all duplex serial I/O mouth of UART (universal asynchronous receiver/transmitter (UART) ), is it realize one-chip computer or one-chip computer and serial communication of computer to use for. (8) Stretch oscillator and clock produce circuit, quartz crystal finely tune electric capacity need outer. Allow oscillation frequency as 12 megahertz now at most. Every the above-mentioned part was joined through the inside data bus .Amongthem, CPU is a core of the one-chip computer, it is the control of the computer and command centre, made up of such parts as arithmetic unit and controller , etc.. The arithmetic unit can carry on 8 persons of arithmetic operation and unit ALU of logic operation while including one, the 1 storing device temporaries of 8, storing device 2 temporarily, 8's accumulation device ACC, register B and procedure state register PSW, etc. Person who accumulate ACC count by 2 input ends entered of checking etc. temporarily as one operation often, come from person who store 1 operation is it is it make operation to go on to count temporarily , operation result and loop back ACC with another one. In addition, ACC is often regarded as the transfer station of data transmission on 8051 inside. The same as general microprocessor, it is the busiest register. Help remembering that agreeing with a express in the order. The controller includes the procedure counter, the order is deposited, the order deciphering, the oscillator and timing circuit, etc. The procedure counter is made up of counter of 8 for two, amounts to 16. It is a byte address counter of the procedure in fact, the content is the next IA that will carried out in PC. The content which changes it can change the direction that the procedure carries out. Shake the circuit in 8051 one-chip computers, only need outer quartz crystal and frequency to finely tune the electric capacity, its frequency range is its 12MHZ of 1.2MHZ. This pulse signal, as 8051 basic beats of working, namely the minimum unit of time. 8051 is the same as other computers, the work in harmony under thecontrol of the basic beat, just like an orchestra according to the beat play that is commanded.There are ROM (procedure memory , can only read ) and RAM in 8051 slices (data memory, can is it can write ) two to read, they have each independent memory address space, dispose way to be the same with general memory of computer. Procedure 8051 memory and 8751 slice procedure memory capacity 4KB, address begin from 0000H, used for preserving the procedure and form constant. Data 8051- 8751 8031 of memory data memory 128B, address false 00FH, using for middle result to deposit operation, the data are stored temporarily and the data are buffered. In RAM of this 128B, there is unit of 32 bytes that can be appointed as the job register, this and general microprocessor is different, 8051 slice RAM and job register rank one formation the same to arrange the location. It is not very the same that the memory of MCS-51 series one-chip computer and general computer disposes the way in addition. General computer for first address space, ROM and RAM can arrange in different space within the range of this address at will, namely the addresses of ROM and RAM, with distributing different address space in a formation. While visiting the memory, corresponding and only an address Memory unit, can ROM, it can be RAM too, and by visiting the order similarly. This kind of memory structure is called the structure of Princeton. 8051 memories are divided into procedure memory space and data memory space on the physics structure, there are four memoryspaces in all: The procedure stores in one and data memory space outside data memory and one in procedure memory space and one outside one, the structure forms of this kind of procedure device and data memory separated form data memory, called Harvard structure. But use the angle from users, 8051 memory address space is divided into three kinds: (1) In the slice, arrange blocks of FFFFH, 0000H of location, in unison outside the slice (use 16 addresses). (2) The data memory address space outside one of 64KB, the address is arranged from 0000H 64KB FFFFH (with 16 addresses) too to the location. (3) Data memory address space of 256B (use 8 addresses). Three above-mentioned memory space addresses overlap, for distinguishing and designing the order symbol of different data transmission in the instruction system of 8051: CPU visit slice, ROM order spend MOVC , visit block RAM order uses MOVX outside the slice, RAM order uses MOV to visit in slice.8051 one-chip computer have four 8 walk abreast I/O ports, call P0, P1, P2 and P3. Each port is 8 accurate two-way mouths, accounts for 32 pins altogether. Every one I/O line can be used as introduction and exported independently. Each port includes a latch (namely special function register), one exports the driver and a introduction buffer. Make data can latch when outputting, data can buffer when making introduction, but four function of pass away these self-same. Expand among the system of memory outside having slice, four ports these may serve as accurate two-way mouth of I/O in common use. Expand among the system ofmemory outside having slice, P2 mouth see high 8 address off; P0 mouth is a two-way bus, send the introduction of 8 low addresses and data / export in timesharingThe circuit of 8051 one-chip computers and four I/O ports is very ingenious in design. Familiar with I/O port logical circuit, not only help to use port correctly and rationally, and will inspire to designing the peripheral logical circuit of one-chip computer to some extent. Load ability and interface of port have certain requirement, because output grade, P0 of mouth and P1 end output, P3 of mouth grade different at structure, so, the load ability and interface of its door demand to have nothing in common with each other. P0 mouth is different from other mouth, its output grade draws the resistance supremely. When using it as the mouth in common use, output grade is it leak circuit to turn on, is it urge NMOS draw the resistance on taking to be outer with it while inputting to go out to fail. When being used as introduction, should write"1" to a latch first. Every one with P0 mouth can drive 8 Model LS TTL load to export. P1 mouth is an accurate two-way mouth too, used as I/O in common use. Different from P0 mouth output of circuit its, draw load resistance link with power on inside have. In fact, the resistance is that two effects are in charge of FET and together: One FET is in charge of load, its resistance is regular. Another one can is it lead to work with close at two state, make its President resistance value change approximate 0 or group value heavy two situation very. When it is 0 that the resistanceis approximate, can draw the pin to the high level fast; when resistance value is very large, P1 mouth high electricity at ordinary times, can is it draw electric current load to offer outwards, draw electric current load to offer outwards, draw the resistance on needn't answer and thinking. Here when the port is used as introduction, must write into 1 to the corresponding latch first too, make FET end relatively about 20,000 ohms because of load resistance in scene and because 40,000 ohms, will not exert an influence on the data that are input. The structure of P2 some mouth is similar to P0 mouth, there are MUX switches. Is it similar to mouth partly to urge, but mouth large a conversion controls some than P1.P3 mouth one multi-functional port, mouth getting many than P1 it have "3 doors and 4 buffers". Two parts there, make her besides accurate two-way function with P1 mouth just, can also use the second function of every pin, "and" door 3 functions one switch in fact, it determines to be to output data of latch to output second signal of function. Act as W=At 1 o'clock, output Q end signal; act as Q=At 1 o'clock, can output W line signal. At the time of programming, it is that the first function is still the second function but needn't have software that set up P3 mouth in advance .It hardware not inside is the automatic to have two function outputted when CPU carries on SFR and seeks the location to visit to P3 mouth/at not lasting lining, there are inside hardware latch Qs=1. The operation principle of P3 mouth is similar to P1 mouth.Output grade, P3 of mouth, P1 of P1, connect with inside have loadresistance of drawing, every one of they can drive 4 Model LS TTL load to output. As while inputting the mouth, any TTL or NMOS circuit can drive P1 of 8051 one-chip computers as P3 mouth in a normal way. Because draw resistance on output grade of them have, can open a way collector too or drain-source resistance is it urge to open a way, do not need to have the resistance of drawing outer. Mouths are all accurate two-way mouths too. When the conduct is input, must write the corresponding port latch with 1 first. As to 80C51 one-chip computer, port can only offer milliampere of output electric currents, is it output mouth go when urging one ordinary basing of transistor to regard as, should contact a resistance among the port and transistor base, in order to the electricity while restraining the high level from exporting P1~P3 Being restored to the throne is the operation of initializing of an one-chip computer. Its main function is to turn PC into 0000H initially, make the one-chip computer begin to hold the conduct procedure from unit 0000H. Except that the ones that enter the system are initialized normally, as because procedure operate it make mistakes or operate there aren't mistake, in order to extricate oneself from a predicament , need to be pressed and restored to the throne the key restarting too. It is an input end which is restored to the throne the signal in 8051 China RST pin. Restore to the throne signal high level effective, should sustain 24 shake cycle (namely 2 machine cycles) the above its effective times. If 6 of frequency of utilization brilliant to shake, restore to the throne signal durationshould exceed 4 delicate to finish restoring to the throne and operating. Produce the logic picture of circuit which is restored to the throne the signal: restore to the throne the circuit and include two parts outside in the chip entirely. Outside that circuit produce to restore to the throne signal (RST) hand over to Schmitt's trigger, restore to the throne circuit sample to output , Schmitt of trigger constantly in each S5P2 , machine of cycle in having one more , then just got and restored to the throne and operated the necessary signal inside. Restore to the throne resistance of circuit generally, electric capacity parameter suitable for 6 brilliant to shake, can is it restore to the throne signal high level duration greater than 2 machine cycles to guarantee. Being restored to the throne in the circuit is simple, its function is very important. Pieces of one-chip computer system could normal running, should first check it can restore to the throne not succeeding. Checking and can pop one's head and monitor the pin with the oscilloscope tentatively, push and is restored to the throne the key, the wave form that observes and has enough range is exported (instantaneous), can also through is it restore to the throne circuit group holding value carry on the experiment to change.MCS-51系列单片机的功能和结构MSC-51系列单片机具有一个单芯片电脑的结构和功能,它是英特尔公司的系列产品的名称。
基于单片机的交通灯设计XXX traffic light system based on two STC89C52 microcontrollers as the core control components。
three-color LED lights as signal light state displays。
and two common cathode seven-segment displays to describe the time that each n's signal light state is maintained。
The system is initialized by a button switch。
and the LED light state maintenance time is displayed in countdown。
with a maximum display time of 99 seconds。
Two sets of left-turn green。
green。
red。
and yellow three-color LED lights are used as the signal light display module for the north-south and east-west ns。
and four sets of red and green two-color LED lights are used as the pedestrian crossing traffic signal indicators for the east-west and north-south ns。
respectively。
This design can handle the basic control of the traffic signal system at XXX。
Traffic lights and PLCWith economic development, increased the number of vehicles, road congestion is becoming increasingly serious, intelligent traffic lights on the emerged. At present, the world's Intelligent Transportation System will be: a huge structure, management difficulties, such as the maintenance of large inputs. In order to improve the existing traffic conditions, and to overcome the existing shortcomings of intelligent transportation system I designed analog control traffic lights in urban and rural areas of small-scale smart traffic lights. It has small size, intelligence, maintenance into small, easy to install and so on. And other intelligent transportation system compared to the system to adapt to economic and social development, in line with the current status of scientific and technological development.Intelligent traffic lights are a comprehensive use of computer network communication technology, sensor technology to manage the automatic control system of traffic lights. Urban traffic control system is used for urban traffic data monitoring, traffic signal control and traffic management computer system; it is the modern urban traffic control system command and the most important component. In short, how to use the appropriate control method to maximize the use of costly cities to build high-speed roads, trunk road and the ramp to alleviate urban areas with the neighboring state of traffic congestion has become more andmore traffic management and urban planning departments need to address the the main problem.Nowadays, traffic lights installed in each crossing, has become the most common and dredge the traffic, the most effective means. The developme nt of the society, people's consumption level unceasing enhancement, pri vate vehicles unceasing increase. And more cars roads are narrow road tra ffic is clear. So adopting effective method to control the traffic light is im perative. PLC intelligent control principle is the core of the control syste m, PLC put the things direction or north-south direction according to qua ntity of vehicles, the corresponding scale what divides class given the gre en light direction between north and south direction according to certain r ules too long. It can realize divides class according to a given the green ca rs duration scale of maximum car release, reduce crossroads vehicles, eas e traffic congestion stagnation, realize the optimal control, so as to impro ve the efficiency of the traffic control system.The application of PLC is continuously, and drive to the deepening traditi onal control test new month benefit updates. It is simple in structure, prog ramming and high reliability etc, convenient already widely used in indus trial processes and position in the automatic control. Due to use of PLC h as the characteristics of environmental adaptable, and its internal timer is very rich in resources, but the current widely used "progressive" lights, es pecially for precise control more than thecrossway control can be easily realized. So now increasingly applying P LC traffic light system.Meanwhile, PLC itself also has communication networking function, will the same path as part of a LAN signal unified dispatching management, can shorten the traffic wait times, realize scientific manage ment. In real-time detection and automatic control of PLC application sys tem, PLC is often used as a core components.In the 21st century, PLC will have greater development. Technically, the c omputer technology can morely new achievements used in programmable controller design and manufacturing, there will be faster, s torage and larger capacity, intelligent stronger varieties appear; Look fro m product size, can further to mini and super-large direction; Look from p roduct compatibility, the variety of our products will be more rich, specifi cation more complete, perfect man-machine interface and complete com munication equipment can better adapt to all kinds of industrial control oc casion demands; Look from the market, all countries to their production of multiple products with international competition intensifies and break, c an appear a few brand monopoly international market situation, can appea r international general programming languages; Judging from the develop ment of the network, programmable controller and other industrial control computernetworking constitute a large control system is programmable controller t echnology development direction. The current computer distributed contr ol system DCS has already a lot of programmable controller applications. Along with the development of computer network, the programmable con troller as automation control network andinternational general network will be an important part of the industry an d industry, the numerous fields outside play an increasing role.In China the increasing amount of motor vehicles, many big cities like Be ijing, Shanghai, nanjing and other ground appeared trafficoverload running condition, traffic accidents problem also more and m ore serious. And because the various special vehicles (such as an ambulance, 119 120 car, police and various special vehicle 110 in emergency situa tions, by red under limited to traffic bring a lot of inconvenience, even ca use traffic accident. And now, most traffic lights at the same moment will appear two or more than two direction at the same time for the green situa tion, and increase the incidence of the traffic accident. Therefore, design a kind of designed for special vehicles through and not cause any traffic ac cident, normal traffic control any time only one direction of modern intell igent traffic light green traffic control system is urgently needed.交通灯与PLC随着经济的发展,车辆的数目不断增加,道路堵车现象日益严重,智能交通灯就应运而生了。
交通灯外文翻译(5篇范文)第一篇:交通灯外文翻译Traffic lights and PLCWith economic development, increased the number of vehicles, road congestion is becoming increasingly serious, intelligent traffic lights on the emerged.At present, the world's Intelligent Transportation System will be: a huge structure, management difficulties, such as the maintenance of large inputs.In order to improve the existing traffic conditions, and to overcome the existing shortcomings of intelligent transportation system I designed analog control traffic lights in urban and rural areas of small-scale smart traffic lights.It has small size, intelligence, maintenance into small, easy to install and so on.And other intelligent transportation system compared to the system to adapt to economic and social development, in line with the current status of scientific and technological development.Intelligent traffic lights are a comprehensive use of computer network communication technology, sensor technology to manage the automatic control system of traffic lights.Urban traffic control system is used for urban traffic data monitoring, traffic signal control and traffic management computer system;it is the modern urban traffic control system command and the most important component.In short, how to use the appropriate control method to maximize the use of costly cities to build high-speed roads, trunk road and the ramp to alleviate urban areas with the neighboring state of traffic congestion has become more and more traffic management and urban planning departments need to address the the main problem.Nowadays, traffic lights installed in each crossing, hasbecome the most common and dredge the traffic, the most effective means.The development of the society, people's consumption level unceasing enhancement, private vehicles unceasing increase.And more cars roads are narrow road traffic is clear.So adopting effective method to control the traffic light is imperative.PLC intelligent control principle is the core of the control system, PLC put the things direction or north-south direction according to quantity of vehicles, the corresponding scale what divides class given the green light direction between north and south direction according to certain rules too long.It can realize divides class according to a given the green cars duration scale of maximum car release, reduce crossroads vehicles, ease traffic congestion stagnation, realize the optimal control, so as to improve the efficiency of the traffic control system.The application of PLC is continuously, and drive to the deepening traditional control test new month benefit updates.It is simple in structure, programming and high reliability etc, convenient already widely used in industrial processes and position in the automatic control.Due to use of PLC has the characteristics of environmental adaptable, and its internal timer is very rich in resources, but the current widely used “progressive” lights, especially for precise control more than thecrossway control can be easily realized.So now increasingly applying PLC traffic light system.Meanwhile, PLC itself also has communication networking function, will the same path as part of a LAN signal unified dispatching management, can shorten the traffic wait times, realize scientific management.In real-time detection and automatic control of PLC application system, PLC is often used as a core components.In the 21st century, PLC willhave greater development.Technically, the computer technology can morely new achievements used in programmable controller design and manufacturing, there will be faster, storage and larger capacity, intelligent stronger varieties appear;Look from product size, can further to mini and super-large direction;Look from product compatibility, the variety of our products will be more rich, specification more complete, perfect man-machine interface and complete communication equipment can better adapt to all kinds of industrial control occasion demands;Look from the market, all countries to their production of multiple products with international competition intensifies and break, can appear a few brand monopoly international market situation, can appear international general programming languages;Judging from the development of the network, programmable controller and other industrial control computer networking constitute a large control system is programmable controller technology development direction.The current computer distributed control system DCS has already a lot of programmable controller applications.Along with the development of computer network, the programmable controller as automation control network and international general network will be an important part of the industry and industry, the numerous fields outside play an increasing role.In China the increasing amount of motor vehicles, many big cities like Beijing, Shanghai, nanjing and other ground appeared traffic overload running condition, traffic accidents problem also more and more serious.And because the various special vehicles(such as an ambulance, 119 120 car, police and various special vehicle 110 in emergency situations, by red under limited to traffic bring a lot of inconvenience, even cause traffic accident.And now, most traffic lights at the same moment willappear two or more than two direction at the same time for the green situation, and increase the incidence of the traffic accident.Therefore, design a kind of designed for special vehicles through and not cause any traffic accident, normal traffic control any time only one direction of modern intelligent traffic light green traffic control system is urgently needed.交通灯与PLC 随着经济的发展,车辆的数目不断增加,道路堵车现象日益严重,智能交通灯就应运而生了。
引言:单片机(Microcontroller)是一种广泛应用于嵌入式系统中的小型计算机芯片。
它集成了处理器核心、存储器、外设接口和时钟电路等核心部件,可以独立运行。
随着全球化的发展,外文文献对于学习和研究单片机领域来说至关重要。
本文翻译的外文文献《MicrocontrollerbasedTrafficLightControlSystem》详细介绍了基于单片机的交通信号灯控制系统。
概述:交通信号灯控制是现代都市交通系统中至关重要的一环。
传统的交通信号灯控制系统通常由定时器控制,不能根据实际交通情况动态调整信号灯的时间。
而基于单片机的交通信号灯控制系统可以实现根据实时交通流量来动态调整信号灯的时间,优化交通效率。
本文将详细介绍该系统的设计和实现。
正文:一、单片机选型1.1.CPU性能:本文选择了一款高性能的32位单片机作为控制核心,它具有较高的处理能力和较大的存储器容量,可以同时处理多条交通路口的信号控制。
1.2.外设接口:该单片机具有丰富的外设接口,可以与交通信号灯、传感器和通信设备等进行连接,实现信号控制和数据交互。
1.3.低功耗设计:为了节约能源和延长系统寿命,在单片机选型时考虑了低功耗设计,降低系统运行的能耗。
二、硬件设计2.1.交通信号灯:在设计交通信号灯时,考虑了日夜可见性和能耗。
采用了高亮度LED作为信号灯光源,同时添加了光敏传感器控制信号灯的亮度,以满足不同时间段的亮度需求。
2.2.传感器:通过安装车辆感应器和行人感应器等传感器,可以在实时监测交通流量的基础上,智能调整信号灯时间,提高路口的交通效率。
2.3.通信设备:在交通信号灯控制系统中引入了通信设备,可以实现各交通路口之间的信息交互和协调控制,提高整体交通系统的效率。
三、软件设计3.1.程序架构:采用了多任务的实时操作系统,将交通信号灯控制、传感器数据处理和通信设备控制等功能分别封装成不同的任务,实现了系统的高效运行和任务调度。
中英文对照资料外文翻译文献附件1:外文资料翻译译文基于单片机的十字路口交通灯控制器的设计由于我国经济的快速发展从而导致了汽车数量的猛增,大中型城市的城市交通,正面临着严峻的考验,从而导致交通问题日益严重,其主要表现如下:交通事故频发,对人类生命安全造成极大威胁;交通拥堵严重,导致出行时间增加,能源消耗加大;空气污染和噪声污染程度日益加深等。
日常的交通堵塞成为人们司空见惯而又不得不忍受的问题。
在这种背景下,结合我国城市道路交通的实际情况,开发出真正适合我们自身特点的智能信号灯控制系统已经成为当前的主要任务。
前言在实际应用上,根据对国内外实际交通信号控制应用的考察,平面独立交叉口信号控制基本采用定周期、多时段定周期、半感应、全感应等几种方式。
前两种控制方式完全是基于对平面交叉口既往交通流数据的统计调查,由于交通流存在的变化性和随机性,这两种方式都具有通行效率低、方案易老化的缺陷,而半感应式和全感应式这两种方式是在前两种方式的基础上增加了车辆检测器并根据其提供的信息来调整周期长和绿信比,它对车辆随机到达的适应性较大,可使车辆在停车线前尽可能少停车,达到交通流畅的效果。
在现代化的工业生产中,电流、电压、温度、压力、流量、流速和开关量都是常用的主要被控参数。
例如:在冶金工业、化工生产、电力工程、造纸行业、机械制造和食品加工等诸多领域中,人们都需要对交通进行有序的控制。
采用单片机来对交通进行控制,不仅具有控制方便、组态简单和灵活性大等优点,而且可以大幅度提高被控制量的技术指标,从而能够大大提高产品的质量和数量。
因此,单片机对交通灯的控制问题是一个工业生产中经常会遇到的问题。
在工业生产中,有很多行业有大量的交通灯设备,在现行系统中,大多数的交通控制信号都是用继电器来完成的,但继电器响应时间长,灵敏度低,长期使用之后,故障机会大大增加,而采用单片机控制,其精度远远大于继电器,响应时间短,软件可靠性高,不会因为工作时间缘故而降低其性能,相比而言,本方案具有很高的可行性。
毕业论文英文资料翻译系别:专业:班级:姓名:学号:Introduction of Programmable controllers From a simple heritage, these remarkable systems have evolved to not only replace electromechanical devices, but to solve an ever-increasing array of control problems in both process and nonprocess industries. By all indications, these microprocessor powered giants will continue to break new ground in the automated factory into the 1990s.HISTORYIn the 1960s, electromechanical devices were the order of the day ass far as control was concerned. These devices, commonly known as relays, were being used by the thousands to control many sequential-type manufacturing processes andstand-along machines. Many of these relays were in use in the transportation industry, more specifically, the automotive industry. These relays used hundreds of wires and their interconnections to effect a control solution. The performance of a relay was basically reliable - at least as a single device. But the common applications for relay panels called for 300 to 500 or more relays, and the reliability and maintenance issues associated with supporting these panels became a very great challenge. Cost became another issue, for in spite of the low cost of the relay itself, the installed cost of the panel could be quite high. The total cost including purchased parts, wiring, and installation labor, could range from $30~$50 per relay. To make matters worse, the constantly changing needs of a process called for recurring modifications of a control panel. With relays, this was a costly prospect, as it was accomplished by a major rewiring effort on the panel. In addition these changes were sometimes poorly documented, causing a second-shift maintenance nightmare months later. In light of this, it was not uncommon to discard an entire control panel in favor of a new one with the appropriate components wired in a manner suited for the new process. Add to this the unpredictable, and potentially high, cost of maintaining these systems as on high-volume motor vehicle production lines, and it became clear that something was needed to improve the control process – to make it more reliable, easier to troubleshoot, and more adaptable to changing control needs.That something, in the late 1960s, was the first programmable controller. This first ‘revolutionary’ system wan developed as a specific response to the needs of the major automotive manufacturers in the United States. These early controllers, or programmable logic controllers (PLC), represented the first systems that 1 could be used on the factory floor, 2 could have there ‘logic’ changed without extensiverewiring or component changes, and 3 were easy to diagnose and repair when problems occurred.It is interesting to observe the progress that has been made in the past 15 years in the programmable controller area. The pioneer products of the late 1960s must have been confusing and frightening to a great number of people. For example, what happened to the hardwired and electromechanical devices that maintenance personnel were used to repairing with hand tools? They were replaced with ‘computers’ disguised as electronics designed to replace relays. Even the programming tools were designed to appear as relay equivalent presentations. We have the opportunity now to examine the promise, in retrospect, that the programmable controller brought to manufacturing.All programmable controllers consist of the basic functional blocks shown in Fig.10. 1. We’ll examine each block to understand the relationship to the control system. First we look at the center, as it is the heart ( or at least the brain ) of the system. It consists of a microprocessor, logic memory for the storage of the actual control logic, storage or variable memory for use with data that will ordinarily change as a function power for the processor and memory. Next comes the I/O block. This function takes the control level signals for the CPU and converts them to voltage and current levels suitable for connection with factory grade sensors and actuators. The I/O type can range from digital (discrete or on / off), analog (continuously variable), or a variety of special purpose ‘smart’ I/O which are dedicated to a certain ap plication task. The programmer is shown here, but it is normally used only to initially configure and program a system and is not required for the system to operate. It is also used in troubleshooting a system, and can prove to be a valuable tool in pinpointing the exact cause of a problem. The field devices shown here represent the various sensors and actuators connected to the I/O. These are the arms, legs, eyes, and ears of the system, including push buttons, limit switches, proximity switches, photosensors, thermocouples, RTDS, position sensing devices, and bar code reader as input; and pilot lights, display devices, motor starters, DC and AC drives, solenoids, and printers as outputs.No single attempt could cover its rapidly changing scope, but three basic characteristics can be examined to give classify an industrial control device as a programmable controller.(1) Its basic internal operation is to solve logic from the beginning of memory to some specified point, such as end of memory or end of program. Once the end isreached, the operation begins again at the beginning of memory. This scanning process continues from the time power is supplied to the time it it removed.(2) The programming logic is a form of a relay ladder diagram. Normally open, normally closed contacts, and relay coils are used within a format utilizing a left and a right vertical rail. Power flow (symbolic positive electron flow) is used to determine which coil or outputs are energized or deenergized.(3) The machine is designed for the industrial environment from its basic concept; this protection is not added at a later date. The industrial environment includes unreliable AC power, high temperatures (0 to 60 degree Celsius), extremes of humidity, vibrations, RF noise, and other similar parameters.General application areasThe programmable controller is used in a wide variety of control applications today, many of which were not economically possible just a few years ago. This is true for two general reasons: 1 there cost effectiveness (that is, the cost per I/O point) has improved dramatically with the falling prices of microprocessors and related components, and 2 the ability of the controller to solve complex computation and communication tasks has made it possible to use it where a dedicated computer was previously used.Applications for programmable controllers can be categorized in a number of different ways, including general and industrial application categories. But it is important to understand the framework in which controllers are presently understood and used so that the full scope of present and future evolution can be examined. It is through the power of applications that controllers can be seen in their full light. Industrial applications include many in both discrete manufacturing and process industries. Automotive industry applications, the genesis of the programmable controller, continue to provide the largest base of opportunity. Other industries, such as food processing and utilities, provide current development opportunities.There are five general application areas in which programmable controllers are used. A typical installation will use one or more of these integrated to the control system problem. The five general areas are explained briefly below.DescriptionThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pinout. Theon-chip Flash allows the program memory to be reprogrammed in-system or by a conventional 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 characteristicThe AT89C51 provides the following 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 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 until the next hardware reset. Pin DescriptionVCC: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 configured 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 1Port 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 to Port 1 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups.Port 1 also receives the low-order address bytes during Flash programming and verification.Port 2Port 2 is an 8-bit bi-directional I/O port with internal pullups.The Port 2 output buffers can sink/source four TTL inputs.When 1s are written to Port 2 pins they arepulled high by the internal pullups and can be used as inputs. As inputs,Port 2 pins that are externally being pulled low will source current, because of the internal pullups.Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses. In this application, it uses strong internal pullupswhen emitting 1s. During accesses to external data memory that use 8-bit addresses, Port 2 emits the contents of the P2 Special Function Register.Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.Port 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups.Port 3 also serves the functions of various special features of the AT89C51 as listed below:Port 3 also receives some control signals for Flash programming and verification. RSTReset input. A high on this pin for two machine cycles while the oscillator is running resets the device.ALE/PROGAddress Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming.In normal operation ALE is emitted at a constant rate of1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory.If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.PSENProgram Store Enable is the read strobe to external program memory.When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.EA/VPPExternal Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.EA should be strapped to VCC for internal program executions.This pin also receives the 12-volt programming enable voltage(VPP) during Flash programming, for parts that require12-volt VPP.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Oscillator CharacteristicsXTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through adivide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.Figure 1. Oscillator Connections Figure 2. External Clock Drive Configuration Idle ModeIn idle mode, the CPU puts itself to sleep while all the onchip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset.It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution,from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.Power-down ModeIn the power-down mode, the oscillator is stopped, and the instruction that invokes power-down is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power-down mode is terminated. The only exit from power-down is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.Program Memory Lock BitsOn the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below.When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly介绍可编程控制器从一个简单的遗产,这显著的系统已经进化到不仅取代机电设备,而是为了解决日益增加的一系列控制问题在这两种过程和nonprocess行业。
英文翻译系别专业班级学生姓名学号指导教师报告日期PLC-based design of traffic lightsWith the social development and progress, traffic flow becomes increasingly important. On the one hand, too many crossroads, more and more vehicles, which are causing serious traffic congestion. On the other hand, in the limited time it is necessary to maintain the vehicle and pedestrian fast and safe. Therefore, one kind of traffic light control system design, can be used to display time countdown, with computer controlled real-time data. In addition, the configuration technology for real-time images that reflect the traffic lights, understand the historical crossroads of work to get traffic lights visualization. The system consists of host compute r and a low computer. MCGS configuration is installed in the host computer is lower by the PLC control system.Normal traffic signal timing diagram shown in Figure 1. But there are some urgent matters, for example. There are a number of ambulances to transport patients to the hospital or to deal with a number of fire engines and fire. Fire engines and ambulances rushed to take precedence over other traffic scene. According to urban traffic control system, under normal circumstances, two control methods and urgency traffic control factors into account. This process can show 14 segment encoder. U.S. traffic lights instant record of the monitoring process.Emergency control signals to control traffic emergency switch. If there is no emergency lights all work, but when an emergency open. In this case, the car is urgent priority pass. Once the emergency vehicle passes, emergency switch off immediately. The green light in the same direction of the vehicle quickly flashes three times, followed by the normal operation. If you were from the north-south and east-west two emergency vehicles, traffic control systems can respond quickly came early, and then another.1. Traffic Control System DesignA. Hardware designCP1H series PLC as controller, display the procedure should stop when the time series of abnormal system operation, the time will not be displayed. When the emergency procedures are completed time series, countdown display program should be reset. At 220 V AC system is used to control traffic lights, 24 V DC control segment encoder, Figure 2 shows the scheme Eastern time display. CP1H series programmable logic controller (PLC) is a simple controller, which consists of 24 inputs and sixteen outputs. Because the output to twenty In this system, an I / O module must be extended. Circuit is shown in Figure 2.Figuer 1.normally time-series diagramFiguer 2.circuit diagram of controlling systemB. Control Program DesignSix timers and two special normal open pulse is used in this system, the green light flashes for all north-south and east-timer and a special pulse; eight kinds of interlocking internal relay is used to implement the urgency and transmit pulse two directions to PLC, shown in the figure. Two SDEC instructions are used to display the countdown display the corresponding light. As an important part of thecountdown display program, east and west of the green light reflected in the view 4 in these programs downloaded to the programmable logic controller (PLC), all the traffic lights running accuracy, urgency, and things can be interlocked from north to south strictly, all the lights can be set back to the urgency of passing state. Therefore, these control program is correct, simple.C. Monitoring SystemComputer system has two main functions: an output signal acquisition and display real-time status of the programmable logic controller (PLC) to control traffic lights, traffic lights. Another notification robot status and history of the state real-time curve by examining the history and alarm window.This monitoring system design and configuration software MCGS configuration is easy. The serial communication is implemented as follows.Figuer 3.main program of controlling systemData inspection methods: double endedSerial Communications Number: COM0 endedThe minimum sampling period: 200 msProgrammable Logic Controller (PLC) The parameters are defined as follows: The minimum sampling period of the basic properties: 200 msThree read / write channel: X0, X1, X2Six read-only access (read U.S. traffic lights): Q0-Q5All channels must be connected to a variable defined in a real-time databaseaccess visits and other parameters to their default values. After a successful relationship, PLC and computer control system is able to change the color of the analog signal lights in the picture on the PC being collected data through the serial port.. In contrast, by changing the parameters of the host, the corresponding value is written to the PLC internal relay control, intersection traffic lights can be implemented. Experimental results show that the system is usually good enough and animation. Online monitoring system of traffic lights in Figure 5:Figuer 4.animation picture from MCGS2. ConclusionExperimental results show that the system is usually configured with enough good photos. This system simplifies the programmable logic controller (PLC) and the communication between the host computer using industrial configuration software development time is greatly reduced. In particular, more suitable for complex controlsystems. We can control the traffic lights by the PLC and MCGS configuration, replace the original relay control, improve the system's lifetime. At the same time, this method can be applied to control the motor and fluid levels. Remote control and configuration combined with the simulation, can be applied to similar control zone.基于PLC的交通灯控制系统设计随着社会的发展和进步,交通畅通变得越来越重要。
本科毕业论文(设计)题目(中文)基于AT89C51单片机的交通灯设计(英文)Design of traffic light basing on AT89C51学院信机学院年级专业 2007级电子信息工程学生姓名张春雷学号 070144928指导教师陈志红完成日期 2011 年 4 月摘要随着全球城市化进程的加快,机动车的数量大增,各地的交通承受的压力都很大,因而出现的问题也越来越多。
如何采用合适的控制方法,最大限度利用好耗费巨资修建的城市高速道路,缓解主干道与匝道.城区同周边地区的交通拥堵状况,越来越成为交通运输管理和城市规划部门亟待解决的主要问题。
随着电子技术的发展,利用单片机技术对交通灯进行智能化管理,已成为目前广泛采用的方法。
本设计采用AT89C51为核心器件来控制交通灯。
Protues软件是英国Labcenter electronics公司出版的EDA工具软件,是做仿真的得力助手。
本交通灯以单片机为核心,以LED灯作为倒计时显示。
有系统简单.实用性强.运行稳定且可靠等优点。
关键词:交通灯;单片机;ProteusAbstractWith the accelerated process of global urbanization, significant increase in the number of motor vehicles, the traffic around the great pressure to bear, so more and more problems. How to use the appropriate control method to maximize the use of a good city to invest in costly high-speed road construction to ease the main road and ramp. City with traffic congestion around the area, has increasingly become a transportation management and urban planning department solved the main problem. With the development of electronic technology, the use of SCM technology for intelligent management of traffic lights, has become widely used method. This design uses AT89C51 as the core component to control the traffic lights. Protues software is published by the British Labcenter electronics companies EDA software tools, simulation of the right hand is doing. The single chip microcomputer as the core of traffic lights to LED lights as the countdown display. A simple system. Practicability. Run stable and reliable.Key words: traffic lights; SCM; Proteus目录上海师范大学本科毕业论文(设计)诚信声明 (I)上海师范大学本科毕业论文(设计)选题登记表 (II)上海师范大学本科毕业论文(设计)指导记录表 (IV)中文摘要及关键词 (V)英文摘要及关键词 (VII)1.单片机概述 (1)1.1单片机的发展 (1)1.2单片机的定义 (2)1.3单片机的特点 (2)1.4单片机的应用领域 (3)2.选题背景 (5)2.1交通灯的简介 (5)2.2AT89C51芯片简介 (6)3. 交通灯的研究思路 (7)3.1概述 (7)3.2需求分析 (7)3.3设计思想 (7)3.4设计要求 (7)4.交通灯的仿真实现 (9)4.1protues仿真软件 (9)4.2实现原理 (9)4.3实现过程 (10)4.3.1 选取元器件 (10)4.3.2 系统连线 (12)4.3.4运行状态 (13)4.4测试 (15)5.总结 (16)参考文献 (17)附录 (18)1.绪论在城市中很明显的能感受到交通的日益拥堵,各种各样的问题都会出现在马路上,像行人穿马路,车辆的行进,都少不了交通灯的指挥,可以说如果没有了交通灯,交通将会瘫痪。
毕业设计(论文)外文文献翻译文献、资料中文题目:基于单片机的交通灯设计文献、资料英文题目:文献、资料来源:文献、资料发表(出版)日期:院(部):专业:班级:姓名:学号:指导教师:翻译日期: 2017.02.14单片机交通灯中英文资料对照外文翻译文献原文题目:DESIGN OF TRAFFIC LIGHT BASED ON MCUBecause of the rapid development of our economy resulting in the car number of large and medium-sized cities surged and the urban traffic, is facing serious test, leading to the traffic problem increasingly serious, its basically are behaved as follows: traffic accident frequency, to the human life safety enormous threat, Traffic congestion, resulting in serious travel time increases, energy consumption increase; Air pollution and noise pollution degree of deepening, etc. Daily traffic jams become people commonplace and had to endure. In this context, in combination with the actual situation of urban road traffic, develop truly suitable for our own characteristics of intelligent signal control system has become the main task.PrefaceIn practical application at home and abroad, according to the actual traffic signal control application inspection, planar independent intersection signal control basic using set cycle, much time set cycle, half induction, whole sensor etc in several ways. The former two control mode is completely based on planar intersection always traffic flow data of statistical investigation, due to traffic flow the existence of variable sex and randomicity, the two methods have traffic efficiency is low, the scheme, the defects of aging and half inductive and all the inductive the two methods are in the former two ways based on increased vehicle detector and according to the information provided to adjust cycle is long and green letter of vehicle, it than random arrived adaptability bigger, can make vehicles in the parking cord before as few parking, achieve traffic flowing effectIn modern industrial production,current,voltage,temperature, pressure, and flow rate, velocity, and switch quantity are common mainly controlled parameter. For example: in metallurgical industry, chemical production, power engineering, the papermaking industry, machinery and food processing and so on many domains, people need to transport the orderlycontrol. By single chip microcomputer to control of traffic, not only has the convenient control, configuration simple and flexible wait for an advantage, but also can greatly improve the technical index by control quantity, thus greatly improve product quality and quantity. Therefore, the monolithic integrated circuit to the traffic light control problem is an industrial production we often encounter problems.In the course of industrial production, there are many industries have lots of traffic equipment, in the current system, most of the traffic control signal is accomplished by relays, but relays response time is long, sensitivity low, long-term after use, fault opportunity increases greatly, and adopts single-chip microcomputer control, the accuracy of far greater than relays, short response time, software reliability, not because working time reduced its performance sake, compared with, this solution has the high feasibility.About AT89C511.function characteristics description:AT89C51 is a low power consumption, high performance CMOS8 bit micro-controller, has the 8K in system programmable Flash memory. Use high-density Atmel company the beltpassword nonvolatile storage technology and manufacturing, and industrial 80S51 product instructions and pin fully compatible. Chip Flash allow program memory in system programmable, also suitable for conventional programmer. In a single chip, have dexterous 8 bits CPU and in system programmable Flash, make AT89C51 for many embedded control application system provides the high flexible, super efficient solution. AT89C51 has the following standard function: 8k bytes Flash, 256 bytes RAM, 32-bit I/O mouth line, the watchdog timer, two data pointer, three 16 timer/counter, a 6 vector level 2 interrupt structure, full-duplex serial port, piece inside crystals timely clock circuit. In addition, AT89C51 can drop to 0Hz static logic operation, support two software can choose power saving mode. Idle mode, the CPU to stop working, allowing the RAM, timer/counter, serial ports, interruption continue to work. Power lost protection mode, RAM content being saved, has been frozen, microcontroller all work stop, until the next interruption or hardware reset so far. As shown in figure 1 for the AT89C51 pins allotment.Figure 1 the AT89C51 pins allotment2.interrupt introductionAT89C51 has six interrupt sources: two external interruption, (and), three timer interrupt (timer 0, 1, 2) and a serial interrupts. Each interrupt source can be passed buy bits or remove IE the relevant special register interrupt allow control bit respectively make effective or invalid interrupt source. IE also includes an interrupt allow total control bit EA, it can be a ban all interrupts. IE. Six is not available. For AT89C51, IE. 5 bits are also not be used. User software should not give these bits write 1. They AT89 series for new product reserved. Timer 2 can be TF2 and the T2CON registers EXF2 or logical triggered. Program into an interrupt service, the sign bit can be improved by hardware qing 0. In fact, the interrupt service routine must determine whether TF2 or EXF2 activation disruption, the sign bit must also by software qing 0. Timer 0 and 1 mark a timer TF0 and TF1 has been presented in the cycle count overflow S5P2 074 bits. Their value until the next cycle was circuit capture down. However, the timer 2 marks a TF2 in count overflow of the cycle of S2P2 074 bits, in the same cycle was circuit capture down3.external clock driving characteristicsTable 14.leisure and power lost pattern external pins stateTable 2About 8255 chip1.8255 features:(1)A parallel input/output LSI chips, efficacy of I/O devices, but as CPU bus and peripheral interface.(2)It has 24 programmable Settings of I/O mouth, even three groups of 8 bits I/O mouth to mouth, PB mouth and PA PC mouth. They are divided into two groups 12 I/O mouth, A group including port A and C mouth (high four, PC4 ~ PC7), including group B and C port B mouth (low four, PC0 ~ PC3). A group can be set to give basic I/O mouth, flash control (STROBE) I/O flash controlled, two-way I/O3 modes, Group B can only set to basic I/O or flash controlled the I/O, and these two modes of operation mode entirely by controlling registers control word decision.2. 8255 pins efficacy:(1). RESET: RESET input lines, when the input outside at high levels, all internal registers (including control registers) were removed, all I/O ports are denoting input methods.(2). CS: chip choose a standard lamp line 1, when the input pins for low levels, namely/CS = 0, said chip is selected, allow 8255 and CPU for communications, / CS = 1, 8255 cannot with CPU do data transmission.(3). RD: read a standard lamp line 1, when the input pins for low levels, namely/RD = 0 and/CS = 0, allow 8255 through the data bus to the CPU to send data or state information, namely the CPU 8255 read from the information or data.(4). The WR: write a standard lights, when the input pins for low levels, namely/WR = 0 and/CS = 0, allows the CPU will data or control word write 8255.(5). D7: three states D0 ~ two-way data bus, 8255 and CPU data transmission channel, when the CPU execution input/output instruction, through its realization 8 bits of data read/write operation, control characters and status information transmitted through the data bus.(6). PA0 ~ PA7: port A input and output lines, A 8 bits of data output latches/buffers, an 8 bits of data input latches.(7). PB0 ~ PB7: port B input and output lines, a 8 bits of I/O latches, an 8 bits of input and output buffer.(8). PC0 ~ PC7: port C input and output lines, a 8 bits of data output latches/buffers, an 8 bits of data input buffer. Port C can through the way of working setting into two four ports, every 4 digit port contains A 4 digit latches, respectively with the port A and port B cooperate to use, can be used as control standard lights output or state standard lights input ports.(9). A0, A1: address selection line, used to select the PA 8255 mouth, PB mouth, PC mouth and controlling registers.When A0=0, A1= 0, PA mouth be chosen;When A0=0, A1 = 1, PB mouth be chosen;When A0=0, A1 = 1, PC mouth be chosen;When A0=1, A1= 1, control register is selected.Concerning seven section LED display introductionThrough light emitting diode chip appropriate link (including series and parallel) and。