湖南商学院《电子技术》课程设计报告题目六路数字抢答器的设计姓名:欧阳娟学号:080910144专业:电子信息工程班级:电信0804班指导教师:何静职称:讲师计算机与电子工程学院2010年6月课程设计评审表姓名欧阳娟学院计算机与电子工程学院学号080910144专业班级电信0804题目六路数字抢答器的设计评审意见评审成绩指导教师签名职称评审时间年月日课程设计作品验收表题目六路数字抢答器的设计参与人员姓名欧阳娟班级电信0804班学号080910144设计任务与要求:1、设计一个供六人使用的抢答器;2、抢答器有锁存和计时功能;3、抢答器有报警功能。作品完成情况:基本完成设计任务与要求。在Proteus软件上的仿真结果完全达到设计要求,实物安装调试过程中完成抢答部分,稍有欠缺。验收情况:验收教师签名:___________年月日目录1绪论..........................................................................................................11.1设计背景···············································································11.2设计任务与要求······································································12总体设计方案...........................................................................................12.1方案选择···············································································22.2数字抢答器总体方框图·····························································23系统详细设计···········································································33.2定时电路·············································································43.3报警电路···············································································53.4时序控制电路·········································································53.5相关元器件的介绍···································································63.5.174LS279···········································································63.5.274LS148···········································································73.5.374LS48译码器···································································83.5.4555定时器·····································································84系统仿真与测试.......................................................................................94.1PROTUES的基本操作方法·························································94.2仿真步骤·············································································104.3仿真结果及分析····································································105安装与调试............................................................................................135.1安装··················································································135.1.1面包板的使用方法及注意事项·············································135.1.2安装注意事项··································································145.2调试···················································································145.2.1调试的方法·····································································145.2.2调试注意事项··································································156收获与体会.............................................................................................16参考文献...................................................................................................16附录..........................................................................................................171六路数字抢答器的设计1绪论1.1设计背景在许多比赛活动中,为了准确、公正、直观地判断出第一抢答者,通常设置一台抢答器,通过数显、灯光及音响等多种手段指示出第一抢答者。同时还可以设置记分、犯规及奖励记录等多种功能。该设计就是针对上述各种要求设计出的供6名选手参赛使用的数字式竞赛抢答器。数字抢答器由主体电路与扩展电路组成。优先编码电路、锁存器、译码电路将参赛队的输入信号在显示器上输出;用控制电路和主持人开关启动报警电路,以上两部分组成主体电路。通过定时电路和译码电路将秒脉冲产生的信号在显示器上输出实现计时功能,构成扩展电路。经过布线、焊接、调试等工作后,数字抢答器成形。1.2设计任务与要求1.设计制作一个可容纳六组参赛的数字式抢答器,每组设计一个抢答按钮供抢答者使用。2.电路具有第一抢答信号的鉴别和锁存功能。在主持人将系统复位并发出抢答指令后,若参赛者按抢答开关,则该组指示灯亮并用组别显示电路显示出抢答者的组别,同时扬声器发出“嘀-嘟”的双音音响持续2~3秒。此时,电路应具备自锁功能,使别组的抢答开关不起作用。3.设置记分电路。每组在开始时预置成100分,抢答后由主持人记分,答对一次加10分,否则减10分。4.设置定时电路。30秒时仍无人抢答,则报警电路工作表示抢答时间耗尽并禁止抢答。5.设置犯规电路。对提前抢答和超时抢答的组别鸣喇叭示警,并由组别电路显示出犯规组别。2总体设计方案22.1方案选择方案一采用74LS148优先编码器分辨选手抢答的先后,并通过RS锁存器74LS279锁存抢答者的编号,再经过74LS48芯片译码驱动共阴极数码管显示。方案二采用CC4067作为编码电路的核心元件,当有选手抢答时输出四位相应的8421BCD码即可同时供16位选手抢答。经CC4511七段译码器译码后驱动共阴极数码管显示,同时利用CD4069组成一个多谐振荡器,作为十进制计数器CC4510的CP脉冲使其计数并与D触发器CD4013完成自动锁存的功能。结论:与方案二相比,方案一使用的芯片少、电路简单且同样能实现其功能,故选用方案一。2.2数字抢答器总体方框图定时抢答器的总体框图如图1所示。其主要由主体电路和扩展电路两部分组成。主体部分完成基本的抢答功能,即开始抢答后,当选手按动抢答键时,能显示选手的编号。同时能封锁输入电路,禁止其他选手抢答。扩展电路完成定时的抢答功能。图1定时抢答器的总体框图图1所示定时抢器的工作过程是:接通电源时,节目支持人将开关置于“清除”位置,抢答器处于禁止工作状态,编号显示器灭灯,定时器显示设定的时间,抢答按钮优先编码电路锁存器译码电路显示电路主持人控制开关控制电路秒脉冲产生电路定时电路译码电路显示电路主体电路扩展电路3当主持持人宣布抢答题目后,说一声“抢答开始”,同时将控制开关拨到“开始”位置,抢答器处于工作状态,定时器倒计时,当定时时间到,却没有选手抢答时,输入电路被封锁,禁止选手超时后抢答。当选手在定时时间内按动抢答键时,抢答器要完成下面几个工作:1.优先编码电路立即分辨出抢答者的编号,并由锁存器进行锁存,然后有译码显示电路显示编号;2.制电路要对输入编码电路进行封锁,避免其他选手再次进行抢答;3.控制电路要使定时器停止工作,时间器上显示抢答时间,并保持到主持人将系统清零为止,以便进行下一轮抢答。3系统详细设计3.1抢答器电路图2抢答电路4参考电路如图所示。该电路完成两个功能:一是分辨出选手按键的先后,并锁存优先抢答者的编号,同时译码显示电路显示编号;二是禁止其他选手按键操作无效。工作过程:开关S置于清除端时,RS触发器的端均为0,4个触发器输出置0,使74LS148的=0,使之处于工作状态。当开关S置于开始时,抢答器处于等待工作状态,当有选手将键按下时(如按下S5),74LS148的输出经RS锁存后,1Q=1,=1,74LS48处于工作状态,4Q3Q2Q=101,经译码显示为5。此外,1Q=1,使74LS148=1,处于禁止状态,封锁其他按键的输入。当按键松开即按下时,74LS148的此时由于仍为1Q=1,使=1,所以74LS148仍处于禁止状态,确保不会出二次按键时输入信号,保证了抢答者的优先性。如有再次抢答需由主持人将S开关重新置?quot;清除然后再进行下一轮抢答。74LS148为8线-3线优先编码器,3.2定时电路图3定时电路5由节目主持人根据抢答题的难易程度,设定一次抢答的时间,通过预置时间电路对计数器进行预置,计数器的时钟脉冲由秒脉冲电路提供。可预置时间的电路选用十进制同步加减计数器74LS192进行设计,具体电路如上图所示。3.3报警电路由555定时器和三极管构成的报警电路如图所示。其中555构成多谐振荡器,振荡频率fo=1.43/[(RI+2R2)C],其输出信号经三极管推动扬声器。PR为控制信号,当PR为高电平时,多谐振荡器工作,反之,电路停振。图4报警电路3.4时序控制电路时序控制电路是抢答器设计的关键,它要完成以下三项功能:①主持人将控制开关拨到开始位置时,扬声器发声,抢答电路和定时电路进