毕业设计(论文)基于AT89C51单片机的八路智能抢答器的设计.doc
《毕业设计(论文)基于AT89C51单片机的八路智能抢答器的设计.doc》由会员分享,可在线阅读,更多相关《毕业设计(论文)基于AT89C51单片机的八路智能抢答器的设计.doc(57页珍藏版)》请在三一办公上搜索。
1、目 录设计总说明IIntroductionIII1 绪论11.1 课题研究现状11.2 选题意义与目的21.3 课题研究的要求及内容21.4 本论文的组织结构32 总体方案论证52.1 总体方案分析52.2 智能抢答器模块化设计73 硬件设计93.1核心控制模块93.1.1单片机的选型93.1.2 AT89C51单片机的介绍123.1.3 AT89C51特殊功能寄存器143.2时钟与复位模块153.2.1时钟模块153.2.2复位模块163.3显示模块的设计183.4按键输入模块的设计213.4.1键盘的分类213.4.2键盘的去抖动223.4.3双功能及多功能键233.5报警模块的设计243
2、.6电源模块的设计263.6.1 变压器263.6.2 整流桥263.6.3 滤波器273.6.4 电源稳压芯片284 软件设计模块304.1单片机编程语言304.2系统程序设计334.3主程序344.4 非法抢答查询子程序384.5 抢答时间调整子程序394.6 正确抢答处理程序414.7 显示处理程序434.8 报警程序435 结论45参考文献47附录A:八路智能抢答器程序清单48附录B 八路智能抢答器原理图58附录C 软件程序流程图59致谢60设计总说明智能抢答器作为一种电子产品已广泛应用于各种智力和知识竞赛场合。但目前所使用的抢答器有的电路较复杂,不便于制作,而且可靠性低,实现起来很困
3、难;有的则用一些专用的集成芯片,而专用集成芯片的购买又很困难。为适应多选手抢答活动的需要而设计一个智能抢答器,这种抢答器具有电路简单,元件普通,易于购买等优点,很好地解决了制作者制作困难和难于购买的问题。本系统就是采用AT89C51单片机为核心而设计的八路智能抢答器。根据抢答器的功能,智能抢答器的设计要求如下:抢答器可以同时供8名选手或8个代表队比赛使用;主持人可以通过智能抢答器的按键设定每道题的抢答时间和回答时间;具有清零和非法抢答控制功能,设置一个系统清除和抢答控制开关,并由主持人操控;当主持人启动“开始抢答按键”后,定时器进行减计时,抢答时间耗尽后禁止抢答;倒计时5秒时,如果仍无人抢答,
4、则系统每1s报警一次,用以提示参赛选手;抢答器具有锁存与显示功能。即选手按下按键,锁存相应选手的参赛编号,并在LED数码管上显示,选手抢答实行优先锁存,其他按键者将不能响应,以便公平地选择第一个抢答者;参赛选手在设定的时间内进行抢答,抢答有效,显示器上显示选手的编号,同时进入回答问题的时间倒计时;倒计时期间,主持人想终止倒计时,可以按下“停止”键,系统会自动进入准备状态。本系统采用软硬件结合的方法而设计,其中硬件设计是借用单片机AT89C51为中心控制模块,采用模块化设计思想,根据系统功能划分成六个模块,分别为:核心控制模块、电源模块、时钟与复位模块、按键输入模块、显示模块、报警模块。软件设计
5、是采用汇编语言编程。按键输入模块共有14个按键,分为抢答按键和控制按键。抢答按键共有八个,分别为S1S8,供抢答选手进行抢答使用;控制按键有六个,分别为S9S14, 其中S9和S10分别为“抢答时间调整键”和“回答时间调整键”;S11和S12分别为时间“加1”和“减1”按键;S13和S14分别为“抢答开始按键”和“停止按键”。显示模块本系统采用四个共阳极LED数码管显示,一个数码管用来显示抢答到问题的选手的号码,两个用来显示倒计时时间,一个未使用的数码管作为以后的扩展使用。时钟与复位模块包括时钟电路和复位电路,单片机的时钟信号用来提供单片机片内各种操作的时间基准,复位操作则使单片机的片内电路初
6、始化,使单片机从一种确定的初态开始运行。报警模块在本系统中为附加模块,它的主要用途就是起到提示并引起人们的注意。电源模块是为了增强本系统应用的广泛性而设计的模块,它的主要任务是将交流220V电压转换为系统中可以直接使用的稳定的直流+5V。本设计限定抢答人数为八人,抢答过程如下:当主持人按“抢答开始按键”后,数码显示屏显示抢答时间倒计时,并在最后五秒启动报警电路提示,在抢答时间过程中八名选手进行抢答,抢答成功后,显示模块显示选手号和回答问题时间。回答完问题后,主持人可按“停止按键”结束,新一轮抢答开始。如果在主持人没有按下“抢答开始按键”而选手就抢答,则视为犯规,显示模块显示“FF”并显示选手号
7、码,而且报警电路进行提示。主持人按“停止按键”后,新一轮抢答开始。显示模块在初始显示、超过规定抢答时间仍无人抢答和答题超过规定时间后显示“FFF”。抢答时间和回答问题的时间可以设定,设定范围为1-99s,原始状态下抢答时间为10s,回答问题时间为30s。后台主持人可以通过“抢答时间调整键”、“回答时间调整键”和时间“加1”、“减1”按键修改抢答时间和选手回答问题的时间时间,改完后“停止按键”确定,新时间开始有效。在抢答器设计过程中,首先完成总体方案的论证制定,然后分析系统的工作原理,在此基础上设计出各部分单元电路原理图,进一步完成对系统电路的设计。在对系统工作原理充分研究的基础上,选择合适的元
8、件型号和参数,再用protel绘图软件画出电路原理图,最后根据电路接口编写软件程序。关键字:抢答器;单片机;AT89C51;模块;按键IntroductionThe intelligent vies to answer first as a kind of electronic products have been widely applied in all kinds of intelligence and knowledge competition situation. But using the current is some complicated circuit vies to an
9、swer first, do not facilitate production, and reliability, low difficult to achieve; Others use some special integrated chips, and the purchase of the special integrated chips and very difficult. In order to adapt to the needs of the many players vies to answer first activities and design a intellig
10、ent vies to answer first device, this vies to answer first instruments have circuit is simple, components, easy to buy ordinary etc, and solves the difficult and hard to buy makers make the problem. This system is AT89C51 microcontroller as the core and the design of the intelligent vies to answer f
11、irst 8. According to the function, intelligent vies to answer first the vies to answer first the design requirements of the following: vies to answer first is also for 8 contestants or 8 teams game; host can through the intelligence is set button vies to answer first each question time and answer th
12、e vies to answer first time; have reset and illegal vies to answer first control function, set up a system to eliminate and vies to answer first, and by a host control switch control; when the host to start start button, the timer vies to answerl first to reduces the time, vies to answer first time
13、after running prohibit contest; countdown 5 seconds, if still no contest, then system every 1 sl alarm once, to tip competitors; vies to answer first instruments have lock to save and displayl function. Thats according to the button, lock to save the corresponding player of the entries, and the Numb
14、ers LED digital display, on the player vies to answer first shall give priority lock to save, the other key cannot respond to fair to choose the first vies to answer first; contestants in the set period of time vies to answer first, viesl to answer first effectively, on the monitor demonstrated cont
15、estants Numbers, and at the same time into the answer problem of the time countdown; during the countdown, the host would like to stop the countdown,can press the stop button, the system will automatically enter the state.The system USES the software and hardware of the method of combining and desig
16、n, including hardware design are borrowed from the single-chip microcomputer AT89C51 as the center control module, the modular design division, with six module, respectively is: the core control module, the power modules, clock and reset module, key input module, display module, alarm module. The so
17、ftware design is the common assembly language programming. Key input module in 14 key, divided into vies to answer first keys and control buttons. Vies to answer first key there were eight, respectively, for vies to answer first S8 S1-players use vies to answer first; Control key has six, respective
18、ly, among them-S14 S9 S9 and S10 are vies to answer first time to adjust key and answer time to adjust keys; S11 and S12 respectively for time add 1 and minus 1 button; S13 and S14 are vies to answer first start button and stop button. Display module the system USES four were LED digital display, an
19、ode tube a digital works to display the player to vies to answer first, number two used to display the countdown, a time of unused digital tube as the expansion of the later use. The clock and reset clock circuit module includes and reset circuit, microcontroller the clock signal used to provide all
20、 kinds of operation of single chip in the benchmark, reset operation time is of circuit chip in to make SCM initialize, from a certain initial state began to run. Alarm module in the system for additional module, its main use is a tip and draw peoples attention. Power supply module is raised to the
21、system design and extensive application of the module, it is the main task of the 220 V ac voltage conversion for dc system can directly use of the stability of the dc + 5 V. This design limited the number of eight, vies to answer first vies to answer first process is as follows: when the host to pr
22、ess the start button vies to answer first, digital display shows vies to answer first time countdown, and in the last five second start alarm circuit hint, in vies to answer first time eight players in the process vies to answer first, after the success display module, vies to answer first demonstra
23、ted contestant number and answer the question time. To answer the question, can press the stop button host, a new round of vies to answer first began to end. If the host did not press the start button and contestant vies to answer first vies to answer first, it shall be regarded as the foul, display
24、 module shows FF and demonstrated contestant number, and alarm circuit hints. According to stop button host, a new round of vies to answer first began after. Display module in the initial display, exceed the prescribed vies to answer first time still no contest and the answer in excess of the prescr
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 毕业设计 论文 基于 AT89C51 单片机 八路 智能 抢答 设计
链接地址:https://www.31ppt.com/p-3978716.html