您好,欢迎来到佳博论文网!

基于单片机的篮球计时计分器设计

论文编号:JD1057论文字数:17719,页数:49,有原理图

摘要

在一般的篮球比赛中,计时和计分大多数都采用人工操作,很简陋的计时,计分方式,但是采用这种方式十分的不方便。而且大多数由于缺少24秒倒计时,控球时间计时不是很准确。本设计就是针对这方面的问题,在充分地分析了篮球比赛的特点的基础上,设计了基于单片机AT89C51作为控制器、LED七段数码管作为显示器的篮球计时计分系统。

本系统的设计过程主要分为计时、计分两大部分,依据各个部分的具体功能和特点,并结合单片机的控制方式,设计了一套可用于一般的比赛的、实用的电子式系统。其主要内容包括硬件设计、软件设计、调试等几部分。在系统中实现了赛程定时设置、赛程时间暂停、及时刷新甲、乙两队双方成绩以及赛后成绩暂存等功能。

在确定了系统总体设计方案的基础上,选择了合适的芯片,并进行硬件电路设计,系统软件设计。同时利用Protel 99 SE绘制出系统原理图。在此基础上也在软件编程环境Keil C51 下进行了软、硬仿真,和仿真结果也验证了本问的正确性和实用性。

关 键 词:74LS21, AT89C51芯片,串行与并行I/O接口,中断,软件抗干扰

ABSTRACT

In the common basketball game, times and score are majority taken manually operated, it is very simple and crude timing, score way, but taking this approach is very inconvenient. And mostly due to the lack of 24 seconds that by count-down, the controlling time was not very accurate. The design is meant to address this issue, on the basis of the gull analysis of the characteristics of the basketball Competition, based on this, I have designed the timing and scoring system, in which, the single-chip computer AT89C51 is regarded as the controller, and the seventh paragraph digital LED is regarded as the player.

The design process of this system is mainly divided into timed and scored two major parts, according to the function and characteristic of each part, and combine the single-chip computer’s control method, then electron type system is be designed, and which is practical, also can be used in general match. Its main contents include hardware design, software design and debugging of several parts. In the system we can achieve a regular schedule set, clinching suspended, a timely update, break A, B two teams of both sides achievement and keep the achievement after the match in time, and other functions.

On the basis of confirming the overall design plan of the system, choosing the suitable chips to do the hardware circuit designing and the software designing. And so T painted the schematic diagram with Protel 99 SE. On this basis, the software and hardware simulated in the software programming environment Keil C51,and the simulation results are illustrated that this text is correct and practical.

Key words:74LS21, AT89C51,serial and parallel I/O interfaces, interrupt,software anti-interruption

目 录

第1章 绪论1

1.1 系统开发背景1

1.2 选题的意义、目的1

1.2.1 选题的意义1

1.2.2 选题的目的2

1.3 本课题完成的任务2

第2章 系统方案设计3

2.1 系统分析3

2.1.1篮球比赛计时计分器设计的现状3

2.1.2 系统分析3

2.2系统基本功能介绍4

2.2.1赛程时间设置4

2.2.2赛程时间启/停设置4

2.2.3 比分交换控制4

2.2.4比分刷新控制4

2.2.5计时计分显示5

2.2.6赛程结束报警5

第3章 系统组成部分6

3.1 单片机选型6

3.1.1 AT89C51单片机介绍6

3.2 键盘系统9

3.2.1 键盘结构与功能12

3.2.2 键盘工作方式12

3.2.3 键盘系统的相关元件13

3.3 显示系统13

3.4 计时系统18

3.4.1 计时系统设计的相关知识18

3.4.2 系统延时子程序的设计18

3.4.3 计时电路工作原理18

3.5 计分系统19

3.5.1 串行接口19

3.5.2 串行/并行转换芯片19

3.5.3 比分校正控制电路20

3.5.4 计分电路的工作原理21

第4章 系统软件设计22

4.1球赛计时计分器的工作过程22

4.2 程序流程图22

4.3 程序设计23

第5章 系统开发与调试25

5.1 Keil uVision2介绍25

5.1.1 uVision2 集成开发环境25

5.1.2 关于开发环境25

5.1.3菜单条,工具条和快捷键26

5.2 软件调试26

5.2.1启动uVision2,新建一个项目文件26

5.2.2从器件库中选择适用的51芯片28

5.2.3 填加程序和目标配置28

5.2.4 程序调试32

第6章 结论与展望33

第7章 结束语34

参考文献35

致 谢37

附录38

基于单片机的篮球计时计分器设计......