您的位置:百味书屋 > 范文大全 > 经典范文 > 单片机控制的简单计算器外文文献 正文 本文移动端:单片机控制的简单计算器外文文献

单片机控制的简单计算器外文文献

2017-05-03 05:46:04 来源网站: 百味书屋

篇一:基于单片机的简易计算器(优秀论文)

编号:100509054015

本 科 毕 业 论 文

题 目:基于单片机的简易计算器

学 院:物理与电子信息学院

专 业:电子信息工程

年 级:10电子信息工程 姓 名:覃海洋

指导教师:丛梦龙

完成日期:

目 录

摘 要 ............................................. 3 Abstract ......................... 错误!未定义书签。 引 言 ............................ 错误!未定义书签。

一、系统总体设计 ................................... 6

1.1设计概述 ......................................................................................... 6

1.2系统整体模块图 ............................................................................... 6

1.3实现方案 ......................................................................................... 6

二、硬件系统设计 ................................... 7

2.1 AT89S52单片机 ................................................................................ 7

2.2单片机复位电路 ................................................................................ 8

2.3单片机的外接晶振电路 ...................................................................... 9

2.4 4x4矩阵键盘 .................................................................................... 9

2.5 八段LED数码管 .............................................................................. 12

2.6 51单片机最小系统 ......................................................................... 15

三、程序调试与系统仿真 ............................. 15

3.1程序调试 ......................................................................................... 15

3.2程序流程图 ..................................................................................... 26

3.3系统仿真 ......................................................................................... 27 结 语 ............................................. 28 主要参考文献 ....................................... 29 致 谢 ............................................ 32

摘 要

近十年来,随着科学技术的提高,电子行业发展迅速,各种电子产品应运而生,其中基于单片机的各类器件更新尤其显著。在日常的生活中,电子产品无处不在,所涉及的领域十分广泛。计算器是人们日常生活的重要工具,其帮助人们快捷地完成一些繁琐的计算,因此一款好的计算器可以给人们的生活带来极大的便易。

根据以上背景,本设计旨在研究一款简单便捷的计算器,方便人们的日常生活。同时,本设计的大致思想为----设计以AT89S52单片机作为主控芯片,采用4x4矩阵键盘做为输入,以4位八段数码管做显示,可以进行无符整数的加、减、乘、除运算,具有清零复位功能,并带有溢出提示。这样的一款计算器可以满足人们日常的计算需求。

同时,考虑到时代环境的要求,本设计的所有程序均采用C语言编写,这样不仅可以降低程序的编写难道,而且可以便于日后程序的移植、修改、升级。设计中用以两片8位三态锁存器74HC573D来对数码管的地址和数据进行锁存,同时用蜂鸣器来作为溢出报警提示。单片机的晶振电路和复位电路均采用常规电路。

关键词:AT89S52;计算器;矩阵键盘;数码管

Abstract

Over the past decade, with the improvement of science and technology, the electronics industry developed rapidly, a variety of electronic products emerged, and various types of microcontroller-based device update are particularly significant. In people’s daily life, electronic products are in a wide range of areas. Calculator is an important tool for people's daily life, which helps people quickly complete some tedious calculations, so a good calculator can bring to people greatly easy.

This study designed a simple and convenient calculator to facilitate people's daily life. Meanwhile, the general idea of this design is ---- AT89S52 microcontroller as the master chip, using 4x4 matrix keyboard as input to 8 eight digital tube to do, it can do an unsigned integer add, subtract, multiply, and divide operation. In addition, it has clear and reset function, and with overflow prompts. Such a calculator can meet people’s computing needs.

At the same time, taking into account the environmental requirements of the times, all programs are designed by the C language, so it can reduce the work of writing programs, and can facilitate future transplant procedures, modifications, upgrades. The calculator uses eight-bite tri-state 74HC573D to latch the address and the data of the digital, and use buzzer as an overflow alarm. Single-chip crystal oscillator circuit and reset circuit are used by the conventional circuit.

Key words:AT89S52 ;Calculator ;Matrix keyboard;8 digital tube

引 言

随着科技的提高,人们对于电子产品的需求日益增强,一款好的电子产品不仅要物美价廉,而且应该简单易懂。生活中,计算无处不在,小到日常的小计算,大到科技尖端的发展。日常生活中计算器的种类繁多,有些计算器的功能过于强大,甚至涉及到按键的复用,这样一来反而不便于老人及小孩的使用,在浪费了资源同时,也有可能给人们带来不舒心的体验。因此,需要一款设计旨在制作一款简单易操作的计算器,能够完成对无符号整数加、减、乘、除计算即可,这样已经可以满足人们在日常生活中对一些简单数据的运算,以方便人们的日常生活,提高其生活质量。同时,要尽可能地运用易得的器件,这也是产品设计的一个出发点,故本设计采用市场上常见的AT89S52单片机作为核心芯片,以4x4矩阵键盘做输入,以8段LED数码管的动态扫描来做输出显示,其中用8位三态锁存器74HC573D来对数码管的地址和数据进行锁存,用蜂鸣器来进行溢出提示,对单片机的外围晶振和复位均采用常规电路。其中,用C语言来完成对程序各个部分的编写,这样不仅可以减小编程的难度,而且易于以后对程序的移植、修改和升级。通过完成此次设计,可以进一步加强对单片机理论的学习,有利于掌握其它电子模块如数码管,矩阵键盘等,而且能够熟悉并掌握单片机开发常用的软件如:PROTEUS,KEIL,STC-ISP等,进一步提高自身的实际动手能力,深化而系统地理解嵌入式的软硬设计思路。这样,有利于日后更高层次的学习,丰富单片机产品的开发经验,能够更加快速的融入这一行业,为以后工作或深造打下良好的基础。

篇二:英文文献单片机

Abstract. Traffic in urban areas is generally regulated by traffic lights, which

represent a traffic flow bottleneck if they are not effectively configured. The dynamic nature of traffic flows makes reliable prediction possible only over a limited time horizon, and hence necessitates continual re-computation solutions. As intersections network size increases, the exponential growth in joint signal timing and traffic states exhibit a computational barrier to determining effective traffic lights timing. So, real-time traffic signal control optimization becomes a challenging problem. The present work investigates the issue of adaptive traffic control using real-time traffic data in multiple intersections. Each network intersection is controlled by an

autonomous agent operating with a view of incoming traffic. The generated model presents ability to identifying dynamic changes in traffic flow conditions as well as adjusting green lights sequences and offering a good coordination between each

intersections neighboring. The main contribution of this model is a real-time adaptive control of the traffic lights, according to discontinuity and heterogeneity of traffic flow. Simulation results confirm the system effectiveness compared to fixed time control, actuated time control and green wave method. And that by mitigating the congestion in terms of maximum throughput traffic flow, minimum waiting time and stops while maintaining fairness among all the network traffic lights. Keywords: Traffic lights control, multiple intersections, adaptive, self-organizing, coordination

1. Introduction

Traffic congestion has become a crucial problem especially in urban locations. This is due to the incapacity of roads to satisfy the expectations of an exponential vehicles number. The consequences are significant costs in terms of man hours lost, excessive fuel consumption, and also an adverse environmental effect through carbon emissions. Thus, congestion reduces the quality of life for many people and represents a major handicap for the road transport system. Nevertheless, it remains the displacement means most used of citizens.

Traffic lights are the key element of traffic control. The combination of several

constraints makes harder to design an effective traffic light control strategy to achieve an optimal real time schedule.

This is especially the case of multiple intersections scenarios since traffic conditions from neighboring intersection have a dynamic impact on the local traffic lights.

Indeed, these flows should become part of the local traffic flow after a certain period. Therefore, the coordination between adjacent intersections should also be taken into account.

Existing methods for traffic lights management can be grouped into three categories: fixed time control,actuated control and adaptive control.

Fixed time control is the most commonly implemented control strategy in the real word. The timing signal is previously calculated based on traffic conditions studied

which is provided by day of week and time of day. A large amount of historical traffic data needs to be collected, recorded and then used to derive some traffic patterns. This is based on different geographic location of intersections and different time periods (e.g.,peak hours).However, these systems cannot be effective because the traffic conditions may change dynamically and significantly from time to time throughout the day. It is only applicable in stable traffic conditions.

The other scheme, called a traffic actuated controller, works by adapting to the volume of vehicles on the road. It does not set a timer for the cycle of signals, but instead measures the volume of vehicles on the road at any given moment and then sets the frequency and interval of traffic lights accordingly. Actuated traffic signal provides a minimum length of green time to each approach during a cycle. This length may be incremented based on vehicle arrivals. The length of every green interval is also constrained by a maximum green time specification.

Compared to fixed time control, actuated control is based on online data which is collected via traffic sensors, as induction loops or infrared sensors that report measurements to a central entity. These traffic volumes data are transferred to the signal control system to decide. However, the variability and unpredictability of

traffic demand on arterial systems often outpace the ability to update signal timings so that signalized intersections operate efficiently.

In the other hand, adaptive traffic control covers a set of techniques which provide a systematic approach for automatic adjustment of traffic lights states in real time. The system aim is to achieve and to maintain a desired level of control system

performance when traffic parameters change in time.

A large variety of adaptive traffic tools have been developed. Thus, the conventional green wave mechanism has been widely used in many cities. It is a traffic control strategy which assigns a fixed offset to a sequence of traffic lights such that if vehicles travel at a certain velocity from specified junction to others, they will not stop at any red lights. The offset is the time needed for vehicles to travel from an

intersection to another one at an expected constant speed. The vehicles are grouped in platoons of varied sizes, determined by signal timings, which progress through the green wave at uniform speed.

Thus, effective adaptive models aim to coordinate signals of controlled intersections so as to improve performances and reduce congestion in urban networks areas.

Generally, adaptive traffic control systems are defined as the application of computing, information, and communications technologies to the real-time vehicles management.

The major researches are focused on Artificial Intelligence (AI) techniques. IA

provides to be a highly promising field for solving the traffic control problems. Indeed, fuzzy systems, artificial neural networks, multiagent systems, evolutionary computing and swarm intelligence are effective computing control tools in dealing with

complexity and dynamics of traffic situation. Implementation of these traffic lights controls is supposed respond to traffic network demand, adapt timing plans in time, and implement real-time control.

In this paper, an adaptive traffic lights control scheme in multiple intersections is proposed based on multi-agents framework. Multi-Agents Systems (MAS) provide an intelligent approach for addressing the realtime traffic signal control problem, given the distributed nature of traffic flow information. The data provided by the sensor detection equipment are assumed to be available to the proposed traffic control system.

First, prior researches in intelligent traffic signal control are reviewed in this paper. Adaptive traffic signal control problem is addressed. Our basic approach to modeling traffic flows and making traffic signal control decisions within each agent is described in Sections III. In Sections IV, experimental results that indicate the performance characteristics of the proposed approach are presented. Finally, in Section V, summarize different results of the present work and indicate guidelines for future research work.

2. Related works

The traffic congestion problem has motivated researchers to study new control strategies to efficiently manage the traffic movement in urban area. Artificial

intelligence techniques have been widely investigated urban traffic control in different areas. In this section, related works of control traffic lights and principally associated intelligent agent’s applications are presented.

2.1. Knowledge based traffic lights models

Initially, Fuzzy logic (FL) field is adopted to model expert’s knowledge by adjusting traffic signal control parameters such cycle length and phase sequence. FL signal controllers [1–5] use a set of rules to determine the preferred action based on a number of inputs. Although results have shown that these methods arecapable of effective control within small networks, the use of a static rule-base implies that further updates to the system may be required over time. Hence, it is difficult to generate an efficient model, especially for complex intersections.

Decision support systems (DSS) consists of computer technology solutions that can be used to support complex decision making and aims to assist human operator in selecting effective measures. Many DSS traffic control systems were developed such Hoogendoorn and Almejalli models [6, 7]. While it has been demonstrated that these

systems are capable of suggesting effective actions, they rely on large databases of historical traffic data and expert knowledge, which may be hard to acquire and maintain. In addition, the data-bases must be constantly updated with new traffic scenarios and control action.

2.2. Neural network traffic lights models

Artificial neural networks (ANNs) have been extensively explored as approaches for decision making. Thus, the authors in [8, 9] have successfully proposed ANN to train a traffic signal controller. ANN Models compute decisions by learning from

successfully solved examples. However, as the size of the road network increases, neural networks suffer significant performance degradation. Moreover, when traffic volumes change, they have to relearn an effective method of control.

2.3. Queue theory traffic lights models

The theory of queues is also a widely used approach when it comes to model the tails present at intersections [10, 11]. The queuing theory algorithm uses the law of “Little” in order to determine the lengths of queues. Using queues information? the model is able to develop a dynamic plan for traffic lights in order to reduce the queue average length as well as the average waiting time. However, this theory requires a number of measuring points to manage the intersection and cannot deal with minor conflicts.

2.4. Agent based traffic lights models

Multiagent Systems (MAS) is an IA tool that provides principles for modeling of complex systems involving multiple agents with centralized and/or decentralized coordination mechanisms. There are many researches in traffic lights modeling using MAS. Thus, Dresner and Stone [12] have tackled the problem using a reservation system for collision avoidance at an intersection. In this system, vehicles make a request to a central agent. If the request is accepted, the vehicle needs to follow the prescribed path, to be safe while crossing the intersection. Preliminary

experimentations with this type of system are promising, with minimum delay of vehicles at intersections. However, it lacks the coordination aspect between multiple traffic lights, which is one of the most important problems that affects the design of such systems. Roozemond [13] presents agent model acting autonomously while

sharing gathered data. Then, intersections use this information to make both short and long term traffic predictions with accordingly adjustment. Bazzan [14] has used a decentralized approach combining MAS and evolutionary game theory. This approach models each intersection as an individually motivated agent which must focuses not only on getting vehicles through the intersection, but also on reducing travel times for all vehicles.

2.4.1. Traffic lights models using reinforcement learning

Several applications of reinforcement learning (RL) exist, such as in the works

[15–19]. These models attempt to infer a reward model for various pairs of state/action by allowing interaction between the controlling agents and traffic

environment. In a large network, the problem of the large number of these pairs restricts the use of RL method in this domain, (convergence problem).

2.4.2. Traffic lights models using swarm optimization methods

The swarm optimization methods are another field of artificial intelligence which was applied to control the traffic lights. The works of Oliveira [20] use the principle of optimization distribution of signal based on the amount of pheromone emitted by waiting vehicles. In [21], authors propose autonomous intersection management

(AIM) based on Ant Colony System (ACS) algorithm that evacuates vehicles for each sequence of vehicles arrivals and for large number of lanes. In addition, numerous works has used evolutionary computing to optimize signal plans within a network

[22–24]. These approaches typically aim to represent the signal plans for the entire network as a set of chromosomes and then an evolutionary algorithm is applied. However, this type of solution requires an extremely high puissance of computing with the network size. In complex networks, real-time control may be impossible because the computation may not complete in a suitable time.

2.4.3. Adaptive traffic lights models

Adjustment of traffic lights configuration is the key aspect in optimization of traffic flow model presented in major previous works. However, in the real world, the

configuration parameters of the traffic lights are based on data and designer’s model which is updated frequently.

The multi-agents model can be used in order to deal with these real situations. But, to provide more accurate data, it must be more adaptive with change. The idea is to

endow the system with its own control system, so it can face its dynamic environment and the multiple situations it will encounter. Thereby, the self-organized system is a particularly appropriate approach to apply within traffic control.

Gershenson [25, 26] presented one of the initial applications of self-organized systems to traffic signal control. The author shows that an agent-based solution is capable of controlling traffic signals effectively. Lammer and Helbing extend this work [27] and present another self-organized control system which is shown to effectively handling several traffic scenarios within hypothetical grid-like networks.

The approach proposed by Xaio-Feng Xie [28], presents a model of aggregates incoming vehicles into clusters which enables the real-time computation of signal timing policies. These Self-scheduling approaches give rise to a self-organizing system.

Zhou and al. [29] provides an adaptive traffic lights algorithm which selects the sequence of phases in a cycle, according to the following criteria: the presence of priority vehicles, totalwaiting time and queue length. This algorithm, however, requires the same type of vehicle with same speed.

篇三:简易计算器设计 文献综述

简易计算器设计的文献综述

随着社会的发展,科学的进步,微电子技术的发展有着日新月异的变化。电子产品的更新速度之快就更不足为奇了, 单片机的应用已经越来越贴近生活,用单片机来实现一些电子设计也变得容易起来。本课题就是利用单片机设计简易的计算器。

1. 引言

1.1 单片机国内外现状与发展前景

当今已是信息化时代,社会快速发展和信息技术革命的不断深入使随着现代科技的飞速发展,单片机已经在各个领域得到越来越广泛的应用,由于其体积小,功耗低这两个基本特征,在通讯,家电,工业控制,仪器仪表,汽车等产品中都可以看到单片机的身影,可以说几乎很难找到哪个领域没有单片机的踪迹,且逐渐地发展成了一门比较关键的技术学科。单片机技术也随着集成电路技术的进步在近几年飞速的发展,这种发展可以分为两方面:一方面在硬件上单片机内部集成了越来越多的功能部件,如A/D,D/A,PWM,WATCHDOG,LCD驱动,串行口,大容量FLASH存储器等;另一方面在开发手段上从汇编语言向高级C语言过度,计算机仿真调试,IAP,ISP技术的应用使单片机开发周期大大的缩短,为各类产品更新,软件的升级提供了可靠的技术保障。在设计单片机应用系统时,由于历史的原因,目前在国内仍然以8051系列单片机为主。

单片机的潜力越来越被人们所重视。特别是沿海地区的电子厂,在不断向内地市场辐射的进程中,多数产品所用的单片机需求量骤增。鉴于单片机应用有着广阔的前景,足以让我们确信培养单片机应用人才,特别是工程技术中普及单片机知识有着极为重要的现实意义。单片机的发展趋势大致为:低功耗CMOS化;微型单片化;主流与多品种共存;单片机从8位、16位到32位,数不胜数,应有尽有,有与主流C51系列兼容的,也有不兼容的,但它们各具特色,互成互补,为单片机的应用提供广阔的天地。

1.2 计算器的发展

提起计算器,值得我们骄傲的是最早的计算工具诞生在中国。中国古代最早采用的一种计算工具叫筹策,又叫做算筹,这种算筹多用竹子制成,也有用木头、兽骨充当材料的,约270,枚一束,放在布袋里克随身携带。17世纪初,西方国家的计算工具有了较大的发展,英国数学家纳皮尔发明的“纳皮尔算筹”,英国牧师奥却德法发明了圆柱形对数计算尺,这种计算尺不仅能做加减乘除、乘方、开方运算,甚至可以计算三角函数、指数函数和对数函数,这些计算工具不仅带动了计算机的发展,也为现代计算器的发展奠定了良好的基础,计算器已经成为现代社会应用广泛的计算工具。

计算器一般由运算器、控制器、存储器、键盘、显示器、电源和一些可选外围设

备及电子配件通过人工或机器设备组成。低档计算器的运算器、控制器由数字逻辑电路实现简单的串行运算,其随机存储器只有一、二个单元,供累加存储用。高档计算器由微处理器和只读存储器实现各种复杂的运算程序,有较多的随机存储单元以存放输入程序和数据。键盘是计算器的输入部件,一般采用接触式或传感式。为减小计算器的尺寸,一键常常有多种功能。显示器是计算器的输出部件,有发光二极管显示器或液晶显示器等。除显示计算结果外,还常有溢出指示、错误指示等。计算器电源采用交流转换器或电池,电池可用交流转换器或太阳能转换器再充电。为节省电能,计算器都采用CMOS工艺制作的大规模集成电路,并在内部装有定时不操作自动断电电路。

随着社会需求,计算器也从原有单一的数字加减计算演变为复杂的多功能运算。现在不在单一的在某一方面而是涉及到生活的方方面面。

2 简易计算器的设计实现

简易计算器主要用于加减乘除,是日常生活中比较常见的电子产品之一,它随处可见,从小商店到会计师的办公桌,到处都离不开它。简易计算器大大提高了我们的工作效率,降低了我们的出错率。设计简易计算器有很多方法,下面介绍两种比较常见的方法。

2.1基于单片机的简易计算器设计

在这个方案中,硬件主要由四部分组成,核心部分为8051单片机芯片,按键部分是一个4*4键盘,采用软件识别键值,并执行相应的操作。显示部分是一个液晶显示器。软件部分主要用C程序语言来编程。大致执行过程:开机显示零,等待输入数值,当键入数字时,通过显示器显示出来,当键入+、-、*、/运算符时,计算器在内部执行数值存储和转换,并等待再次输入数值,当再次输入数值后,显示新输入的数值,按等号就会在显示器上输出运算结果。

2.2用数字逻辑电路设计简易计算器

在这个方案中,用两块带并行输入的BCD码计数器74LS192芯片,和一块8位数比较器74LS682,,两块BCD七段译码器,两个数码管和脉冲发生电路来实现的。该计算器用555做时钟信号发生器,通过选择开关把CP脉冲加到计数器,计数器置数时,先将置数开关合上,再通过BCD拨码开关置数,完成后将置数开关复位,计数器的输出要通过七段译码器送到数码管显示,将计数器的输出信号送到比较器与所设的上限数值进行比较,将比较结果再通过继电器输出,将结果送到脉冲信号发生器,进行加减法计算。

计算器这一小小的程序机器实际上是从计算机中割裂出来的衍生品,但因其方便快捷的操作模式,已经被广泛应用于商业等日常生活中,极大的方便了人们对于数字的整合运算。计算器的程序一般都已经固定,只需按键输入数据和运算符号就会得出结果,

很容易就能掌握。对比上诉两种设计方法,结合自己专业特点,选择用8051单片机来设计简易计算器,因为它是一种通用型的单片机,性价比较高,虽然是8位的单片机,但现在应用的量及范围还很大,同时,因51单片机发展的历史长,学习资料比较多而且完善, 且依靠单片机实现的简易计算器体积小、质量轻、价格便宜、功能强、灵活方便。

3 总结

近年来,单片机的种类层出不穷,功能越来越强大,但8051仍有很强的实用性,在很多方面都可以用得到,且51系列单片机是一个通用的单片机,其内部的结构及工作原理与其它的单片机都是相通的。学习了它对于学习其他同类型的芯片有很大的帮助。而计算器亦是日常生活中常用到的简单器件,它贴近生活,所以本次的设计有很大的实际意义。

通过本次利用单片机来实现简易计算器的设计,使我能够更熟练地掌握单片机的设计流程及基本原理,对单片机的认识也有个质的飞跃。研究单片机,熟练单片机的开发流程对应届毕业生,尤其是电子信息专业的我们来说是有重要意义的。

参考文献

[1]边春元. C51单片机典型模块设计与应用 [M].北京: 机械工业出版社, 2008.4

[2]彭伟.单片机语言程序设计实训100例[M].北京:电子工业出版社,2009.6

[3]常敏,王涵.51单片机应用程序开发与实践 [M].北京:电子工业出版社,2009.3

[4]张毅刚.新编MCS-51单片机应用设计[M].哈尔滨:哈尔滨工业大学出版社,2006.10

[5]胡辉.单片机原理及应用设计 [M].北京:水利水电出版社,2005.7

[6]赵建领. 51系列单片机开发宝典[M].北京:电子工业出版社,2007.4

[7]崔武子,赵重敏,李青. C程序设计教程[M].北京:清华大学出版社,2007.6

[8]王秋爽,曾昭龙. 单片机开发基础与经典设计实例[M].北京:机械工业出版社,2008.3

[9]马忠梅.单片机的C语言应用程序设计[M]. 北京:北京航天航空大学出版社,2003.11

[10]张毅刚.单片机原理及应用[M].北京:高等教育出版社,2004.1


单片机控制的简单计算器外文文献》出自:百味书屋
链接地址:http://www.850500.com/news/142543.html
转载请保留,谢谢!
相关文章
  • 单片机控制的简单计算器外文文

    基于单片机的简易计算器(优秀论文)编号:100509054015本科毕业论文题目:基于单片机的简易计算器学院:物理与电子信息学院专业:电子信息工程年级:10电子信息工程姓名:覃海洋指...

推荐范文