基于单片机的八路智能抢答器的设计_毕业设计 联系客服

发布时间 : 星期一 文章基于单片机的八路智能抢答器的设计_毕业设计更新完毕开始阅读4e11329fdb38376baf1ffc4ffe4733687e21fc94

华北科技学院毕业设计(论文)

基于单片机的八路智能抢答器的设计总说明

智能抢答器作为一种电子产品已广泛应用于各种智力和知识竞赛场合。但目前所使用的抢答器有的电路较复杂,不便于制作,而且可靠性低,实现起来很困难;有的则用一些专用的集成芯片,而专用集成芯片的购买又很困难。为适应多选手抢答活动的需要而设计一个智能抢答器,这种抢答器具有电路简单,元件普通,易于购买等优点,很好地解决了制作者制作困难和难于购买的问题。本系统就是采用AT89C51单片机为核心而设计的八路智能抢答器。

根据抢答器的功能,智能抢答器的设计要求如下:抢答器可以同时供8名选手或8个代表队比赛使用;主持人可以通过智能抢答器的按键设定每道题的抢答时间和回答时间;具有清零和非法抢答控制功能,设置一个系统清除和抢答控制开关,并由主持人操控;当主持人启动“开始抢答按键”后,定时器进行减计时,抢答时间耗尽后禁止抢答;倒计时5秒时,如果仍无人抢答,则系统每1s报警一次,用以提示参赛选手;抢答器具有锁存与显示功能。即选手按下按键,锁存相应选手的参赛编号,并在LED数码管上显示,选手抢答实行优先锁存,其他按键者将不能响应,以便公平地选择第一个抢答者;参赛选手在设定的时间内进行抢答,抢答有效,显示器上显示选手的编号,同时进入回答问题的时间倒计时;倒计时期间,主持人想终止倒计时,可以按下“停止”键,系统会自动进入准备状态。

本系统采用软硬件结合的方法而设计,其中硬件设计是借用单片机AT89C51为中心控制模块,采用模块化设计思想,根据系统功能划分成六个模块,分别为:核心控制模块、电源模块、时钟与复位模块、按键输入模块、显示模块、报警模块。软件设计是采用汇编语言编程。

按键输入模块共有14个按键,分为抢答按键和控制按键。抢答按键共有八个,分别为S1―S8,供抢答选手进行抢答使用;控制按键有六个,分别为S9―S14, 其中S9和S10分别为“抢答时间调整键”和“回答时间调整键”;S11和S12分别为时间“加1”和“减1”按键;S13和S14分别为“抢答开始按键”和“停止按键”。显示模块本系统采用四个共阳极LED数码管显示,一个数码管用来显示抢答到问题的选手的号码,两个用来显示倒计时时间,一个未使用的数码管作为以后的扩展使用。时钟与复位模块包括时钟电路和复位电路,单片机的时钟信号用来提供单片机片内各种操作的时间基准,复位操作则使单片机的片内电路初始化,使单片机从一种确定的初态开始运行。报警模

第I页 共Ⅴ页

块在本系统中为附加模块,它的主要用途就是起到提示并引起人们的注意。电源模块是为了增强本系统应用的广泛性而设计的模块,它的主要任务是将交流220V电压转换为系统中可以直接使用的稳定的直流+5V。

本设计限定抢答人数为八人,抢答过程如下:当主持人按“抢答开始按键”后,数码显示屏显示抢答时间倒计时,并在最后五秒启动报警电路提示,在抢答时间过程中八名选手进行抢答,抢答成功后,显示模块显示选手号和回答问题时间。回答完问题后,主持人可按“停止按键”结束,新一轮抢答开始。如果在主持人没有按下“抢答开始按键”而选手就抢答,则视为犯规,显示模块显示“FF”并显示选手号码,而且报警电路进行提示。主持人按“停止按键”后,新一轮抢答开始。显示模块在初始显示、超过规定抢答时间仍无人抢答和答题超过规定时间后显示“FFF”。抢答时间和回答问题的时间可以设定,设定范围为1-99s,原始状态下抢答时间为10s,回答问题时间为30s。后台主持人可以通过“抢答时间调整键”、“回答时间调整键”和时间“加1”、“减1”按键修改抢答时间和选手回答问题的时间时间,改完后“停止按键”确定,新时间开始有效。

在抢答器设计过程中,首先完成总体方案的论证制定,然后分析系统的工作原理,在此基础上设计出各部分单元电路原理图,进一步完成对系统电路的设计。在对系统工作原理充分研究的基础上,选择合适的元件型号和参数,再用protel绘图软件画出电路原理图,最后根据电路接口编写软件程序。

关键字:抢答器;单片机;AT89C51;模块;按键

第II页 共Ⅴ页

华北科技学院毕业设计(论文)

Introduction

The 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 answer 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 intelligent 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 first 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 the 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 \button, the timer vies to answer? first to reduces the time, vies to answer first time after running prohibit contest; countdown 5 seconds, if still no contest, then system every 1 s? alarm once, to tip competitors; vies to answer first instruments have lock to save and display? function. That's according to the button, lock to save the corresponding player of the entries, and the Numbers 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, vies? to answer first effectively, on the monitor demonstrated contestant's 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 \state.

The system USES the software and hardware of the method of combining and design, 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 software design is the common assembly language programming.

第III页 共Ⅴ页

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, respectively, among them--S14 S9 S9 and S10 are \respectively for time \button\anode 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 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 people's attention. Power supply module is raised to the 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 press the \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 demonstrated contestant number and answer the question time. To answer the question, can press the \first began to end\first vies to answer first, it shall be regarded as the foul, display module shows \and demonstrated contestant number, and alarm circuit hints. According to \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 prescribed time shows \of 1-99 s, original state vies to answer first time for 10 s and answer the question time for 30 s. Backstage host can \time\time after time, change \

In the design process, vies to answer first do first overall scheme, and then analyses the argument for the working principle of the system, and based on this, the design of unit of the circuit principle diagram, further to the design of the system to complete the circuit. In the

第IV页 共Ⅴ页