文档库 最新最全的文档下载
当前位置:文档库 › 自动化开题报告基于单片机的篮球计时计分器设计

自动化开题报告基于单片机的篮球计时计分器设计

安徽工程大学机电学院

本科毕业设计(论文)开题报告题目:基于单片机的篮球计时计分器设计

课题类型:设计 实验研究□论文□

学生姓名:罗文

学号:312107010124

专业班级:自动化2121

教学单位:安徽工程大学机电学院

指导教师:韩超

开题时间:2016年1月10日

2016年1月10日

一、本课题的研究意义、研究现状和发展趋势

1.课题的研究意义

虽然篮球比赛中很早就开始研究应用了电子计时计分器,但通常都是利用模拟电子器件、数字电子器件或是模拟、数字混合组成的,其稳定性和高准确度计时计分仍存在一些问题。随着科学技术的发展和电子技术的不断更新,对其稳定和高准确度计时计分的实现至今仍是生产和科研的课题。

工程技术的电子化、集成化和系统化促进了电子工程技术的发展,同时也促进了电子工程技术在社会各行业中的广泛应用。随着单片机在各个领域的广泛应用,许多单片机作控制的球赛计时计分系统也就应运产生,例如用单片机控制LCD 液晶显示器计时计分器,用单片机控制LED七段显示器计时计分等。同时单片机在此领域的广泛应用,也大大提高了比赛中计时计分的稳定性和准确性。

篮球比赛在中国越来越被人们关注,同时也被更多青少年所喜爱。篮球赛记时计分器是对比赛过程中所产生的时间、比分等数据进行快速采集记录、加工处理、传递利用的工具。根据不同运动项目的不同比赛规则要求,篮球赛记时计分器包括评分类、命中类、制胜类、得分类等多种类型。

篮球比赛是根据运动队在比赛时间里得分多少来决定胜负的。因此,篮球比赛的记时计分器是一种得分类型的工具。篮球比赛的记时计分器由计时器、计分器等多种电子设备组成。同时,根据目前高水平蓝球比赛要求,完善的蓝球比赛计时计分系统设备应该能够与现场成绩处理、现场大屏幕、电视转播车等多种设备相联,以便实现提高比赛现场感、表演娱乐观众等功能。

2.研究现状

篮球赛记时计分器的设计具有赛程时间计时、调整及暂停和比赛计分显示的功能。一方面,方便了人们比赛时的计时计分工作,在某种程度上可促进篮球赛的开展,既有利于发展这项体育活动,又有利于增强人们的体质,另一方面,随着参与篮球运动的人数的增多,也有利于篮球运动的选拔,对我国的篮球事业也具有促进作用。

虽然篮球比赛中很早就开始研究应用了计时计分器,但通常都是利用模拟电子器件、数字电子器件或是模拟、数字混合组成的,其稳定性和高准确度计时计分扔存在一些问题。随着科学技术的发展和电子技术的不断更新,对其稳定和高准确度计时计分的实现至今仍是生产和科研的课题。

随着单片机在各领域的广泛应用,许多用单片机做控制的球赛计时计分系统也就应运产生,如单片机控制LED液晶显示器计时计分器,用单片机控制LED七段显示器记时计分器等。同时单片机在此领域的广泛应用,也大大提高了比赛中记时计分的稳定性和准确性。

3.发展趋势

篮球是以投篮为中心的对抗性体育运动之一,1892年1月,为美国马萨诸塞州菲尔的基督教青年会训练学校教师詹姆士〃奈斯密斯博士所创。伴随着篮球的出现,篮球记时计分器也应运而生了。起初,并没有正规的计时计分器,只有简单的比赛计时钟和记录板。1932年,刚诞生的国际篮联以美国大学使用篮球规则为基础,制定了第一份世界统一的竞赛规则,同时篮球记时计分器也开始进入了电子时代,开始出现比赛计时钟、简单电路搭成的计分电路。20世纪70年代以来,单片机以极其高的性价比受到人们的重视和关注,应用广泛,发展很快。

单片机的集成度高,功能强,通用性好,特别是它具有体积小、重量轻、抗干扰能力强、对环境要求不高、价格便宜、可靠性高、灵活性好、开发较为容易

和使用方便等独特的优点。世界各大电气厂家,测控技术企业竞相把单片机应用于产品更新,作为实现数字化,智能化的核心部件。篮球计时计分器就是以单片机为核心的记时计分系统,有计时器,计分器,显示器等组成。

二、主要设计(研究)内容

本毕业设计主要利用AT89C51单片机编程控制LED七段数码管作显示的球赛

计时计分系统。

本系统具有赛程定时设置、赛程时间暂停、及时刷新甲、乙两队双方的成绩、

甲、乙双方交换场地以及赛后成绩暂存等功能。系统设计完成后应具有成本价格

低廉、性能稳定、高准确度显示、操作方便且易携带等特点。广泛适合各类学校

和小团体作为赛程计时计分。

设计一个篮球赛计时计分器的系统。该系统具有以下功能:

1以AT89C51单片机为处理核心;

2LED数码管显示时间和比分;

3方便设置比赛中和各个环节。

篮球赛计时计分器包含了8951系列单片机的最小应用系统的构成,同时在此基础上扩展了一些实用性强的外围接口,进一步了解到LED显示器的结构、工作原理以及这种显示器的接口通信,学习利用串行口来扩展显示接口等。

三、研究方案及工作计划

1.硬件电路构成

本系统采用单片机AT89C51作为本设计的核心元件,应该全面、深度掌握单片机的结构、

特点,以至于更好的发挥单片机的强大功能。单片机结构框图如图1所示。

图1单片机结构框

系统硬件电路由以下几个部分组成:单片机AT89C51;计时电路;计分电路;报警电路;按键开关。系统硬件结构框图如图2所示。

图2篮球赛计时计分器的结构框图

本系统采用单片机AT89C51作为本设计的核心元件,利用7段共阴LED作为显示器件。在此设计中共接入10个7段共阴LED显示器,其中6个用于记录甲、乙两队的分数,每队员个LED显示器显示分数范围可达到0—999分,足够满足赛程需要。另外4个LED显示器则用来记录赛程时间,其中2个用于显示分钟;2个用于显示秒钟。赛程计时采用倒计时方式。即比赛前将时间设置好,比赛开始时启动计时,直至计时到零为止。计时范围可达到0~99分钟,也完全满足实际的需要。

其次,为了配合计时器和计分器校正、调整时间和比分,我们特定在本设计中设立了7个按键。其中4个用于输入甲、乙两队的分数;另外3个则用于完成设置、调整、启动和暂停赛程时间等功能。

再次,我们还设计了定时报警系统,即比赛时间到时,我们立即通过扬声器发出报警声,提示整个赛程结束。

为了实现本系统的各个功能,必须掌握单片机的技术、显示器及其I/O接口、LED显示器显示方式、串行接口、定时器的应用等各种硬性指标。

2.软件设计

本系统采用了89C51单片机,所有的程序都固化于FLASH中,用来存贮保存时间、分数等值。其主程序的主要功能有:系统初始化与初始工作状态设置,工作功能的判别、随时显示数值等,其主程序流程如图3所示。

图3主程序流程图

3.工作计划

2015年12月25日---2016年1月10日:检查搜集资料,认真填写开题报告,并把情况汇报指导老师,提交开题报告。

2016年2月22日---2016年2月29日:完成毕业设计论文的整体框架,并收集相应的资料。

2016年3月1日---2016年3月8日:完成毕业设计论文的一半,给指导教师审查修改,指导老师提修改意见,同时进行论文中期检查。

2016年3月9日---2016年3月24日:完成毕业设计论文的系统的软件设计,指导教师审查修改,指导老师提出修改意见。

2016年3月25日---2016年4月2日:完成毕业设计论文初稿,指导教师审查初稿,提出修改意见。

2016年4月3日---2016年4月10日:完成毕业设计论文的修改稿一,给指导教师审查修改,指导老师提修改意见。

2016年4月11日---2016年4月18日:完成毕业设计论文的修改稿二,给指导教师审查修改,指导老师提修改意见。

2016年4月19日---2016年4月24日:完成毕业设计论文定稿。

四、阅读的主要参考文献

[1]张丽.单片机的发展与应用[J].科技咨询导报,2007,27:8-9.

[2]田拥军,赵光强,曾健平.基于RS485总线技术的PC机与单片机多机通讯设计[J].湖南工程学院学报(自然科学版),2007,02:19-23.

[3]元增民.AT89S51单片机与ADC0809模数转换器的三种典型连接[J].长沙大学学报,2005,05:75-78.

[4]王效华,牛思先.基于单片机PWM控制技术的实现[J].武汉理工大学学

报,2010,01:94-98.

[5]乔建华,李临生,田启川.Proteus在单片机教学中的应用分析[J].电气电子教学学报,2008,03:70-73.

[6]许超,吴新杰,张丹.基于Proteus的单片机课程教学改革[J].辽宁大学学报(自然科学版),2011,01:27-29.

[7]林欣,潘向峰.基于单片机链式网络的抢答计分器.解放军信息工程大学理学院学报,2006,52-53.

[8]赵月静,陈继荣,张永弟.单片机原理及应用课程创新实践教学改革[J].实验技术与管理,2013,01:176-179.

[9]吴兴中,欧青立.一种PC与单片机多机RS232串口通信设计[J].国外电子测量技术,2009,01:74-76.

[10]Hun Xinrong,Fingerprint Identification System and Its Application[J].Computer Technology Information,1999,(12):31-35.

附件:

Abstract

The paper mainly deals with the design of hardware for an automatic fire fighting system,which aimed at closed combustible places.This system adopts single chip microcomputer with smoke sensor and temperature sensor as the detective devices.By using the single chip microcomputer,it can achieve the aim of automatic fire fighting.And,this system uses high pressured nitrogen as the fire extinguishing agent,which is economical and environment friendly.It accords with the human’s needs of environmental protection.

Key words:Single chip microcomputer;Fire detection;Sensor;A/D converter;

Introduction The use of fire has promoted the development of human society and civilization.But,fire out of control,i.e.,fire hazard,has posed a serious threat to human life and property,and damaged greatly to the ecological environment that human survival depends on.In order to prevent fires and reduce fire losses,it has a great importance to develop a practical control system that integrating the functions of intelligent fire detection and automatic https://www.wendangku.net/doc/ed3967213.html,pared with existing fire alarm systems,this system has the following characteristics.First,by integrating the detection functions of temperature sensor and smoke sensor,it can reduce the omission rate and false alarm rate.Second,the system can monitor flammable places conveniently due to the human-computer interaction system.Third,the system can realize multi-point data logging and enlarge alarm https://www.wendangku.net/doc/ed3967213.html,st,the usage of

high-pressure nitrogen gas to extinguishing fire does not spoil the environment and has good economic returns.

Working principle of the system2.1Parameters for fire detection This system chooses smoke and temperature as fire detection parameters.It has a complex fire detecting system composed of the smoke detector and the thermal https://www.wendangku.net/doc/ed3967213.html,posite detection can eliminate the interference and false alarm caused by non-fire signals which haven’t multiple signal parameters of the real fire.These signals include dust, water,gas and tobacco smoke.2.2The overall system plan design The principle of the single chip microcomputer based automatic alarm and fire extinction system is shown in Figure1.The system can be divided into two modules:signal acquisition module and signal processing module.

Signal acquisition module Signal acquisition module consists of smoke detector, temperature detector and signal processing circuit.Smoke detector is mainly made up of infrared light-emitting diode and phototransistor.The light source is an infrared light-emitting diode,which generates high-frequency infrared radiation pulses by oscillation circuit.Phototransistor is fixed with a certain distance to the light emission point as an infrared receiver.When the fire occurs,a certain concentration of smoke enters the smoke detector.Then the intensity of the infrared light that the phototransistor received decreases,and the resistance of phototransistor increased.So the transistor becomes conductive.After signal processing,the output voltage V1 decreases greatly.In the temperature detector with the positive temperature coefficient is used.After the fire occur,the temperature signal voltage V2increases slowly along with the indoor temperature.

Signal processing module

The control part consists of the two major functional modules:A/D converter, the8279keyboard and the interface of the monitoring module.

The smoke signal and the temperature signal after preamplifier get into the A/D converter.ADC0816converts the analog signal into digital signal and sends to the CPU,which compares the digital signals with the settings in the program and determines whether to open the optical isolation so as to control the relays.These relays achieve optical alarm,sound alarm and high-pressure nitrogen gas fire-extinguishing.Connecting the8279chip with the CPU,an interface is expanded with a keyboard and an interface circuit of Monitor.The value of the alarm temperature is input through the keyboard and it will display on LED.Therefore,it achieves human-computer interaction and embodies the intelligence,which is another advantage of using microcomputer.

Microcontroller circuit design the schematic diagram of the control circuit has been shown in Figure2.It is mainly made up of the8051chip,16-channel A/D converter ADC0816,a4×4keyboard,a4-bit LED displayer and other interface chips In order to improve anti-jamming capability,several anti-jamming systems are designed relatively.

The design of the interface between ADC0816and8051chip in the system, interface circuit of ADC0816and8051hardware uses interruption and is shown in figure3.By using this method,the main program could proceed after CPU start the A

/D conversion.When the A/D conversion ends,it sends a signal EOC as the end of the conversion,which will be received by INT1end of the8051after an inverter,and then an interrupt request to the CPU will be sent.After the CPU responds,the data will be read and processed.

The starting signal START of ADC0816is produced by chip-selecting line P2.1 and the"NOR"from the writing signal WR.ALE connects START,i.e.,the analogue information is decided by the input channel selected and the conversion starts.The output enable signal OE is decided by the reading signal RD and the"NOR"from the chip-selecting line P2.1.The output of the data is followed by a reading operation from ADC0816.The conversion ending signal EOC"NOT"connects with the INT1 of8051.At the ending of the conversion,EOC turns from0to1.At last INT1is0and the interrupt is open.According to the line selection and decoding connection in figure3,the addresses of ADC0816analog channel0to16are duplicated.One assigning method is:FDF0H~FDFFH.The input voltage VIN=D*VREF/255= 5D/255.

The design of keyboard interface circuit In the process of designing the keyboard interface circuit,the number of buttons,functions and corresponding wiring are decided according to the digital input and control functional requirements.There are 16operation keys on the keyboard and the arrangement is4×4.The usable14 operational keys are:…The number keys are labeled0~9.…"ENT"key:Pressing the key can make the system work after parameter setting and changing.…"CLR"key: When modifying the alarm temperature is needed,pressing the key can clear the displayer.…"STP"key:In the process of the system alarm,pressing the key may shut down the alarm bell and close the high-pressure nitrogen gas control valve.…"RST" key:It is used for system reset.

The keyboard interface circuit is shown in Figure4.Three scan lines SL0~SL3are used.These scan lines are decoded by3-8decoder74LS138and the decoder outputs lines Y0,Y1.The two lines and the eight return lines of8279build a2×8matrix. Since the16th key is the reset button,it does not connect with8279.When the buttons (4×4)connect with the matrix,8279set them continuous key values from0to15.In particular,the number keys0to9are consistent with the values represented by them. This property greatly facilitates the design of key processing.According to the key inputs,8279notify the microcomputer to handle interruption.

The design of display interface circuit

The main usage of the displayers includes LED(light emitting diode display)and LCD(liquid crystal display).Both the displayers are low-cost,configuration flexible, and facilitate to the microcontroller interface comfortably.LED displayer is used in this design.In the interface circuit of the monitor shown in figure5,two output lines OUTB0~OUTB3and OUTA0~OUTA3in8279are connected to segment-select-side of a common cathode LED through two reverse driver chips7404 of six bite input-output.So it can input segment-select-code.There are totally4LED displayers,so8279is an8character displayer.Its scan lines SL0~SL2output signal in a way of coding,and it drives chip74LS138to achieve bit-selection control on the monitor through the3-8line decoder.8279status/control port is7FFFH and the data

port is7FEFH.

译文

摘要

本文主要论述了一种封闭式可燃场所自动灭火系统的硬件设计。本系统采用单片机与烟雾传感器和温度传感器作为检测装置。利用单片机,实现自动灭火的目的。本系统采用高压氮气作为灭火剂,是经济和环境友好的。它符合人类环境保护的需要。

关键词:单片机;火灾探测;传感器;模数转换器;

介绍了火灾的使用促进了人类社会和文明的发展。但是,火灾失控,即火灾危险性,对人类的生命财产构成了严重威胁,严重破坏了人类赖以生存的生态环境。为了防止火灾,减少火灾损失,开发一个集智能火灾探测和自动灭火功能于一体的实用控制系统具有重要意义。与现有的火灾报警系统相比,该系统具有以下特点。首先,通过集成温度传感器和烟雾传感器的检测功能,它可以减少遗漏率和误报率。二、系统可方便地监控易燃场所,方便人机交互系统。第三、系统可实现多点数据记录和放大报警范围。最后,使用高压氮气灭火火不破坏环境,并具有良好的经济效益。

系统的工作原理2.1参数对火灾探测本系统选择的烟雾和温度作为火灾探测参数。它有一个复杂的火灾探测系统的烟雾探测器和热探测器。组合检测能消除火灾信号对非火灾信号的干扰和虚警,对实际火灾没有多个信号参数。这些信号包括灰尘,水,气体和烟草烟雾。2.2整体系统方案设计的原则,单片机为基础的自动报警和灭火系统如图1所示。系统分为信号采集模块和信号处理模块两个模块。

信号采集模块、信号采集模块包括烟雾探测器、温度探测器和信号处理电路。烟雾探测器主要由红外发光二极管和光敏三极管。光源是一种红外发光二极管,它通过振荡电路产生高频红外脉冲。光敏三极管固定有一定距离的发光点作为一个红外接收器。当火灾发生时,一定浓度的烟雾进入烟雾探测器。然后对红外光线的强度降低,光敏三极管接收,和光敏三极管的阻力增加。因此,晶体管变得导电。信号处理后,输出电压V1大大降低。在温度检测器中,使用正温度系数热敏电阻。火灾发生后,温度信号电压V2慢慢随着室内温度的升高。

信号处理模块

控制部分主要由两个主要功能模块组成:一个模数转换器、8279个键盘和监控模块的接口。

前置放大器进入模数转换器后的烟雾信号和温度信号。ADC0816把模拟信号转换成数字信号并发送给CPU,它将数字信号在程序的设置和决定是否开启光隔离从而控制继电器。这些继电器实现光报警,声音报警和高压氮气灭火。将8279芯片与中央处理器连接起来,用键盘和显示器接口电路进行扩展。报警温度的值是通过键盘输入,它将显示在。因此,它实现了人机交互,体现了智能,这是使用微机的另一个优点。

单片机电路设计的控制电路原理图已如图2所示。它主要是由8051芯片,16通道A/D转换器ADC0816,4×4键盘,一个4位LED显示器和其他接口芯片,为了提高抗干扰能力,多种抗干扰系统设计比较。

在系统ADC0816和8051芯片的接口设计接口电路和硬件中断和8051 ADC0816采用如图3所示。通过使用该方法,主程序可以进行后处理器开始的/

天的转换。当A/D转换结束时,它发送一个信号EOC为转换结束后,将收到由8051INT1结束后逆变器,然后一个中断请求CPU将发送。处理器响应后,数据将被读取和处理。

对ADC0816出发信号开始是通过片选线P2.1和”和“从写信号WR产生。啤酒连接启动,即,模拟信息是由输入通道决定的,转换开始。输出使能信号OE的读信号RD和”和“从选线P2.1芯片决定。数据的输出是由读操作从ADC0816。转换结束信号EOC”不是“8051INT1连接。在转换结束,EOC从0到1转。最后是0和INT1中断开。根据选线和解码连接在图3中,0到16的模拟通道ADC0816地址复制。一种分配方法是:fdf0h~fiffh。输入电压VIN=D*VREF/255 =5D/255。

键盘接口电路的设计,在键盘接口电路的设计过程中,根据数字输入和控制功能要求决定了按键的数量、功能及相应的接线方式。键盘上有16个操作键,排列4个4。使用14个操作键: 数字键标记0~9。 “ENT”键:按下键后可以改变参数设置,使系统工作。 “CLR”键:当修改报警温度时,按下键可以清楚的显示。 “STP”键:在系统报警的过程中,按此键可关闭报警关闭高压氮气控制阀。 “RST”键:它是用于系统复位。

键盘接口电路如图4所示。三扫描线去~SL3的使用。这些扫描线是由3-8译码器74LS138译码器的输出线Y0和Y1的解码。这条线和八条8279条线,2条,条,8条。因为第十六个按键是复位按钮,它没有连接8279。当按钮(4-4)与矩阵连接时,8279将其连续的键值从0到15。特别是,数字键0到9是与自己的值相一致。此属性大大方便了设计的关键处理。根据按键输入,8279通知微机handle中断。

显示接口电路的设计

该显示器的主要用途包括LED(发光二极管显示器)和LCD(液晶显示器)。无论是显示器成本低,配置灵活,便于单片机接口舒适。LED显示屏设计中采用。在图5中所示的显示器的接口电路,两输出线outb0~outb3和outa0~outa3 8279连接段选择身边的一个共阴极LED驱动芯片7404通过两反六口的输入输出。所以它可以输入段选择代码。共有4个LED显示器,所以8279是一个8个字符的显示。它的扫描线去~SL2输出信号的一种编码方式,它的驱动器芯片74LS138实现位选控制显示器上通过3-8线译码器。8279状态/控制端口和数据端口7fefh7FFFh。

五、指导教师意见(签名)

201年月日

相关文档
相关文档 最新文档