教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 高等教育 >

基于单片机的八位抢答器

来源:网络收集 时间:2026-08-27
导读: 八位抢答器 摘 要随着电子技术的飞速发展,基于单片机的控制系统已广泛应 用于工业、农业、电力、电子、智能楼宇等行业,微型计算机作为嵌入式控制系统的主体与核心,代替了传统的控制系统的常规电子线路。同时楼宇智能化的发展与成熟,也为基于单片机的照明

八位抢答器

摘 要随着电子技术的飞速发展,基于单片机的控制系统已广泛应

用于工业、农业、电力、电子、智能楼宇等行业,微型计算机作为嵌入式控制系统的主体与核心,代替了传统的控制系统的常规电子线路。同时楼宇智能化的发展与成熟,也为基于单片机的照明控制系统的普及与应用奠定了坚实的基础。

本设计是以八路抢答为基本理念。考虑到依需设定限时回答的功能,利用80c51单片机及外围接口实现的抢答系统,利用单片机的定时器/计数器定时和记数的原理,将软、硬件有机地结合起来,使得系统能够正确地进行计时,同时使数码管能够正确地显示时间。用开关做键盘输出,扬声器发生提示。同时系统能够实现:在抢答中,只有开始后抢答才有效,如果在开始抢答前抢答为无效;抢答限定时间和回答问题的时间可在1-99s设定;可以显示是哪位选手有效抢答和无效抢答,正确按键后有音乐提示;抢答时间和回答问题时间倒记时显示,满时后系统计时自动复位及主控强制复位;按键锁定,在有效状态下,按键无效非法。

关键词: 80C51; 抢答器; 计时; 报警

ABSTRACT

1

With the rapid development of electronic technology, the control system based on SCM has been widely used in industry, agriculture, electricity, electronics, intelligent buildings, industry, micro-computers embedded control system as the main and core, instead of the traditional control System of conventional electronic circuits. At the same time the development of intelligent buildings and maturity, but also based on the lighting control system MCU and popularity of application laid a solid foundation.

This design is eight road Qiangda as the basic concept.By taking into account the need for seting time and limiting to answer the function, which uses 80C51 microcontroller and external interface of Qiangda system, and uses SCM timer / counter timing and the number of mind Principle, the software and hardware organically combined, which could allow the right to conduct time, while the digital display to the correct time. Switching with the keyboard output, speakers in tips. At the same time, system can be realized .In Qiang da and which only begins after the Qiangda only effective, if at the beginning of Qiangda before Qiangda invalid; Qiangda limited time to answer questions and the time can be set in the 1-99 s; players who can show that it is effective and Qiangda Qiang da invalid, right after the music keys tips; Qiangda time to time and answer questions Dao Ji shi, over time, the system automatically reset control and

2

mandatory reduction; keys locked in an active state, the key is invalid illegal.

Key words: 80C51; alphanumeric display; Qiangda; time; alarm

3

目 录

1 概述 ........................................... 5

1.1硬件系统设计 ................................................................................................................................ 5 1.2软件设计 ........................................................................................................................................ 6

2 系统总体方案及硬件计 ........................... 6

2.1控制系统及所需元件 .................................................................................................................... 6 2.2实验原理 ........................................................................................................................................ 7 2.3 80C51 单片机 ............................................................................................................................... 8

3 软件系统设计 .................................. 11 4 系统仿真 ...................................... 18

4.1 Keil uVision2软件 ...................................................................................................................... 18 4.2 PROTUCE 软件 .......................................................................................................................... 18

5 心得体会 ...................................... 21 6 参考文献 ...................................... 23 附1:源程序代码 ................................ 24 附 2:系统原理图 ................................ 39

4

1 概述

《单片微型计算机原理与接口技术》是一门技术性,应用性、实践性很强的学科。课程设计是学好本门课程的又一重要实践性教学环节,课程设计的目的和任务就是配合单片机的教学和平时实验,以达到巩固消化课程的内容,进一步加强综合应用能力及单片机应用系统开发和设计能力的训练,启发创新思维,使之具有独立单片机产品和科研的基本技能,是以培养学生综合运用所学知识的过程,是知识转化为能力和能力转化为工程素质的重要阶段。在实际生活中有好多地方都用到了单片机,因此学习好这门课程有着十分重要的意义。

要求的模拟的抢答器:1) 能容许2-8 组进行抢答。2) 能显示抢答组号。3) 各组记分,并能记分显示。4) 比赛结束时,能发出报警声。

1.1硬件系统设计

1)控制系统主要由单片机应用电路、存储器接口电路、显示接口电路组成。其中单片机80C51 是系统工作的核心,它主要负责控制各个部分协调工作。

2)硬件组成及所需元件:该系统的核心器件是80C51。在其外围接上复位电路、上拉电阻、数码管、按钮及扬声器。元件为:晶振X1、电容C1、C2、C3、 电阻RP1。P3.0 和P3.1 由裁判控制,分别是抢答停止和开始键。P1.0-P1.7是8 组抢答的输入口, P2.0--P2.3 口为数码

5

…… 此处隐藏:2129字,全部文档内容请下载后查看。喜欢就下载吧 ……
基于单片机的八位抢答器.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/614387.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)