基于单片机的十字路口交通灯控制器的设计外文翻译资料

 2022-12-07 05:12

Based on MCU intersection traffic lights the controller design

Because 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.

Preface

In 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 effect

In 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 orderly control. 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 AT89C51

  1. 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 allotment

  1. interrupt introduction

AT89C51 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 down

  1. external clock driving characteristics

symbols

parameters

minimum

The maximum

unit

1/TCLCL

OscillatorFrequency

0

24

MHz

TCLCL

Clock Perio

剩余内容已隐藏,支付完成后下载完整资料


基于单片机的十字路口交通灯控制器的设计

由于我国经济的快速发展从而导致了汽车数量的猛增,大中型城市的城市交通,正面临着严峻的考验,从而导致交通问题日益严重,其主要表现如下:交通事故频发,对人类生命安全造成极大威胁;交通拥堵严重,导致出行时间增加,能源消耗加大;空气污染和噪声污染程度日益加深等。日常的交通堵塞成为人们司空见惯而又不得不忍受的问题。在这种背景下,结合我国城市道路交通的实际情况,开发出真正适合我们自身特点的智能信号灯控制系统已经成为当前的主要任务。

前言

在实际应用上,根据对国内外实际交通信号控制应用的考察,平面独立交叉口信号控制基本采用定周期、多时段定周期、半感应、全感应等几种方式。前两种控制方式完全是基于对平面交叉口既往交通流数据的统计调查,由于交通流存在的变化性和随机性,这两种方式都具有通行效率低、方案易老化的缺陷,而半感应式和全感应式这两种方式是在前两种方式的基础上增加了车辆检测器并根据其提供的信息来调整周期长和绿信比,它对车辆随机到达的适应性较大,可使车辆在停车线前尽可能少停车,达到交通流畅的效果。

在现代化的工业生产中,电流、电压、温度、压力、流量、流速和开关量都是常用的主要被控参数。例如:在冶金工业、化工生产、电力工程、造纸行业、机械制造和食品加工等诸多领域中,人们都需要对交通进行有序的控制。采用单片机来对交通进行控制,不仅具有控制方便、组态简单和灵活性大等优点,而且可以大幅度提高被控制量的技术指标,从而能够大大提高产品的质量和数量。因此,单片机对交通灯的控制问题是一个工业生产中经常会遇到的问题。

在工业生产中,有很多行业有大量的交通灯设备,在现行系统中,大多数的交通控制信号都是用继电器来完成的,但继电器响应时间长,灵敏度低,长期使用之后,故障机会大大增加,而采用单片机控制,其精度远远大于继电器,响应时间短,软件可靠性高,不会因为工作时间缘故而降低其性能,相比而言,本方案具有很高的可行性。

关于AT89C51

(1)功能特征描述:

AT89C51是一种低功耗、高性能CMOS8位微控制器,具有8K 在系统可编程Flash 存储器。使用Atmel 公司高密度非易失性存储器技术制造,与工业80S51 产品指令和引脚完全兼容。片上Flash允许程序存储器在系统可编程,亦适于常规编程器。在单芯片上,拥有灵巧的8 位CPU 和在系统可编程Flash,使得AT89C51为众多嵌入式控制应用系统提供高灵活、超有效的解决方案。AT89C51具有以下标准功能: 8k字节Flash,256字节RAM,32 位I/O 口线,看门狗定时器,2 个数据指针,三个16 位定时器/计数器,一个6向量2级中断结构,全双工串行口,片内晶振及时钟电路。另外,AT89C51 可降至0Hz 静态逻辑操作,支持2种软件可选择节电模式。空闲模式下,CPU停止工作,允许RAM、定时器/计数器、串口、中断继续工作。掉电保护方式下,RAM内容被保存,振荡器被冻结,单片机一切工作停止,直到下一个中断或硬件复位为止。如图1为8051引脚分配图。

图1 8051引脚分配图

(2)中断介绍

AT89C51有6个中断源:两个外部中断( 和),三个定时中断(定时器0、1、2)和一个串行中断。每个中断源都可以通过置位或清除特殊寄存器IE 中的相关中断允许控制位分别使得中断源有效或无效。IE还包括一个中断允许总控制位EA,它能一次禁止所有中断。IE.6位是不可用的。对于AT89C51,IE.5位也是不能用的。用户软件不应给这些位写1。它们为AT89系列新产品预留。定时器2可以被寄存器T2CON中的TF2和EXF2的或逻辑触发。程序进入中断服务后,这些标志位都可以由硬件清0。实际上,中断服务程序必须判定是否是TF2 或EXF2激活中断,标志位也必须由软件清0。定时器0和定时器1标志位TF0 和TF1在计数溢出的那个周期的S5P2被置位。它们的值一直到下一个周期被电路捕捉下来。然而,定时器2的标志位TF2 在计数溢出的那个周期的S2P2被置位,在同一个周期被电路捕捉下来。

(3)外部时钟驱动特性

符号

参数

最小值

最大值

单位

1/TCLCL

时钟震荡频率

0

24

MHz

TCLCL

时钟周期

41.6

ns

TCHCX

高电压时间

15

ns

TCLCX

低电压时间

15

ns

TCLCH

上升时间

20

ns

TCHCL

下降时间

20

ns

表1

(4)空闲和掉电模式外部引脚状态

模式

程序存储器

ALE

^PSEN

PORT0

PORT1

PORT2

PORT3

空闲模式

内部

1

1

数据

数据

数据

数据

空闲模式

外部

1

1

浮空

数据

数据

数据

掉电模式

内部

0

0

数据

数据

数据

数据

掉电模式

外部

0

0

浮空

数据

数据

数据

表2

关于8255芯片

1. 8255特性:

(1) 一个并行输入/输出的LSI芯片,多功效的I/O器件,可作为CPU总线与外围的接口.

(2) 具有24个可编程设置的I/O口,即使3组8位的I/O口为PA口,PB口和PC口.它们又可分为两组12位的I/O口,A组包括A口及C口(高4位,PC4~PC7),B组包括B口及C口(低4位,PC0~PC3).A组可设置为基本的I/O口,闪控(STROBE)的I/O闪控式,双向I/O3种模式;B组只能设置为基本I/O或闪控式I/O两种模式,而这些操作模式完全由控制寄存器的控制字决定.

2. 8255引脚功效:

(1).RESET:复位输入线,当该输入端外于高电平时,所有内部寄存器(包括控制寄存器)均被清除,所有I/O口均被置成输入方式。

(2).CS:芯片选择旌旗灯号线,当这个输入引脚为低电平时,即/CS=0时,表示芯片被选中,允许8255与CPU进行通讯;/CS=1时,8255无法与CPU做数据传输。

(3).RD:读旌旗灯号线,当这个输入引脚为低电平时,即/RD=0且/CS=0时,允许8255通过数据总线向CPU发送数据或状态信息,即CPU从8255读取信息或数据。

(4).WR:写入旌旗灯号,当这个输入引脚为低电平时,即/WR=0且/CS=0时,允许CPU将数据或控制字写入8255。

(5).D0~D7:三态双向数据总线,8255与CPU数据传送的通道,当CPU执行输入输出指令时,通过它实现8位数据的读/写操作,控制字和状态信息也通过数据总线传送。

(6).PA0~PA7:端口A输入输出线,一个8位的数据输出锁存器/缓冲器,一个8位的数据输入锁存器。

(7).PB0~PB7:端口B输入输出线,一个8位的I/O锁存器,一个8位的输入输出缓冲器。

(8).PC0~PC7:端口C输入输出线,一个8位的数据输出锁存器/缓冲器,一个8位的数据输入缓冲器。端口C可以通过工作方式设定而分成2个4位的端口,每个4位的端口包含一个4位的锁存器,分别与端口A和端口B配合使用,可作为控制旌旗灯号输出或状态旌旗灯号输入端口。

(9).A0,A1:地址选择线,用来选择8255的PA口,PB口,PC口和控制寄存器。

当A0=0,A1=0时,PA口被选择;

当A0=0,A1=1时,PB口被选择;

当A0=1,A1=0时,PC口被选择;

当A0=1,A1=1时,控制寄存器被选择。

有关七段LED显示器的介绍

通过发光二极管芯片的适当连接(包括串联和并联)和适当的光学结构。可构成发光显示器的发光段或发光点。由这些发光段或发光点可以组成数码管、符号管、米字管、矩阵管、电平显示器管等等。通常把数码管、符号管、米字管共称笔画显示器,而把笔画显示器和矩阵管统称为字符显示器。

1. LED显示器分类

(1)按字高分:笔画显示器字高最小有1mm(单片集成式多位数码管字高一般在2~3mm)。其他类型笔画显示器最高可达12.7mm(0.5英寸)甚至达数百mm。

(2)按颜色分有红、橙、黄、绿等数种。

(3)按结构分,有反射罩式、单条七段式及单片集成式。

(4)从各发光段电极连接方式分有共阳极和共阴极两种。

2. LED显示器的参数

由于LED显示器是以LED为基础的,所以它的光、电特性及极限参数意义大部分与发光二极管的相同。但由于LED显示器内含多个发光二极管,所以需有如下特殊参数:

(1) 发光强度比

由于数码管各段在同样的驱动电压时,各段正向电流不相同,所以各段发光强度不同。所有段的发光强度值中最大值与最小值之比为发光强度比。比值可以在1.5~2.3间,最大不能超过2.5。

(2) 脉冲正向电流

若笔画显示器每段典型正向直流工作电流为IF,则在脉冲下,正向电流可以远大于IF。脉冲占空比越小,脉冲正向电流可以越大。

交通信号控制类型

交通信号控制的目的有三点:第一,在时间上和空间上分隔交叉口不同方向的车流,控制车流的运行秩序;第二,使在平面交叉的道路网络上人和物的运输达到最高效率;第三,为道路使用者提供必要的信息,帮助他们有效地使用交通设施。道路交通信号控制的基本类型有多种分法。

按控制区几何特性划分为:单个交叉口的控制——点控、交通干线的协调控制——线控、交通网络的协调控制——面控;按控制原理划分:定时控制、感应控制、自适应控制。

关于看门狗电路

在由单片机构成的微型计算机系统中,由于单片机的工作常常会受到来自外界电磁场的干扰,造成程序的跑飞,而陷入死循环,程序的正常运行被打断,由单片机控制的系统无法继续工作,会造成整个系统的陷入停滞状态,发生不可预料的后果,所以出于对单片机运行状态进行实时监测的考虑,便产生了一种专门用于监测单片机程序运行状态的芯片,俗称'看门狗'(watchdog)。

MAX692是微系统监控电路芯片,具有后备电池切换、掉电判别、看门狗监控等功能。其封装和引脚说明如图2所示。

图2 MAX692封装和引脚

看门狗电路的应用,使单片机可以在无人状态下实现连续工作,其工作原理是:看门狗芯片和单片机的一个I/O引脚相连,该I/O引脚通过程序控制它定时地往看门狗的这个引脚上送入高电平(或低电平),这一程序语句是分散地放在单片机其他控制语句中间的,一旦单片机由于干扰造成程序跑飞后而陷入某一程序段 进入死循环状态时,写看门狗引脚的程序便不能被执行,这个时候,看门狗电路就会由于得不到单片机送来的信号,便

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[32231],资料为PDF文档或Word文档,PDF文档可免费转换为Word

您需要先支付 30元 才能查看全部内容!立即支付

课题毕业论文、文献综述、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找。