基于单片机的篮球比赛计分器设计毕业论文 下载本文

毕业论文

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

总计 毕业设计 (论文) 47页

表 格 7表 插 图 40幅

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

摘 要

随着电子产品的逐渐发展,单片机在电子产品中占据着越来越重要的部位,篮球计时计分器就是以单片机为核心,分为计时电路,计分电路,时间暂停以及修改时间的,倒计时提醒电路,复位电路等。在篮球比赛中作为记录比分和时间的重要依据[1]。

计时电路:根据篮球比赛的时间要求,设置好比赛的规定时间,通过编程,在显示器上显示出来,进而连接在大屏幕上,可供观众观看。

计分电路:在比赛开始后,每对进一个球,都会要有相应的得分,通过程序的设定也要把比分显示在显示器上,以便能够实时的传递给观众。

时间暂停和修改时间电路:在比赛过程中,可能会发生一些事情,需要更改时间或暂停时间,在这里我们选择应用按键的方式来改变比赛的时间。

复位电路:是单片机本身的外接电路,当程序进入死循环是或想要实现的功能没实现时,我们可以尝试着进行复位,看电路是否可以正常工作。

倒计时提醒电路:在比赛的最后,为了让运动员有心理准备,我们设置了倒计时提醒功能,在最后十秒时用蜂鸣器发声来提醒运动员,比赛即将结束。

本次实验通过以51单片机为核心,LCD显示屏进行显示,通过Proteus软件进行仿真,得到了预期的结果。

关键词:单片机;显示器;按键;Proteus

I

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

Abstract

With the gradual development of electronic products, electronic products, SCM occupy an increasingly important part of basketball time points is microcontroller as the core, into the timing circuit, scoring circuit, time pause and modify time countdown Alert circuit, reset circuit.

Timing circuit: According to the time requirements basketball game, good game settings specified time, through programming, show up on the display, and then connected to the big screen for the audience to watch.

Scoring circuit: After the start of the game, for each goal scored will have the appropriate score, by setting the score of the program is displayed on the display should to be able to transfer to the audience in real time.

Time to pause and modification time circuit: during the game, something might happen, you need to change the time or pause time, where we choose to apply the key ways to change the game time.

Reset circuit: the external circuit microcontroller itself when the program enters an infinite loop or function you want to achieve is not achieved; we can try to reset, to see whether the circuit is working properly.

Countdown to remind Circuit: In the last game, in order to allow the athletes have been psychologically, we set the countdown reminder, in the final ten seconds with a small light flashes to remind players, the game is about to end.

The experiments with 51 microcontroller core, LCD screen display, through the Proteus simulation software, to get the desired results.

Keywords: microcontroller; monitor; button; Proteus

II

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

目录

摘 要 ............................................................................................... I Abstract ........................................................................................ II

1.1 目的及意义 ........................................................................................ 1

1.1.1设计(论文)的目的 ............................................................... 1 1.1.2设计(论文)的意义 ............................................................... 1 1.2 研究现状 ............................................................................................ 2 1.3 论文的主要工作 ................................................................................ 3 1.4 章节安排 ............................................................................................ 3

第2章 设计方案 .......................................................................... 4

2.1 设计要求 ............................................................................................ 4 2.2 设计思路 ............................................................................................ 4 2.3 系统的硬件框图 ................................................................................ 4

第3章 器件介绍 .......................................................................... 6

3.1 AT89C51单片机 ............................................................................. 6

3.1.1 简介 .......................................................................................... 6 3.1.2主要功能 ................................................................................... 7 3.1.3管脚说明 ................................................................................... 8 3.2 LCD1602显示器 ........................................................................... 10

3.2.1 DS1602的特性 ....................................................................... 10 3.2.2管脚功能 ................................................................................. 11 3.3 晶振 .................................................................................................. 13 3.4 蜂鸣器 .............................................................................................. 13

3.4.1 蜂鸣器的分类 ........................................................................ 13 3.4.2 蜂鸣器的驱动方式 ................................................................ 15 3.5 排阻 .................................................................................................. 16 3.6 按键 .................................................................................................. 17 3.7 三极管 .............................................................................................. 18

3.7.1 三极管的分类 ........................................................................ 19 3.7.2 三极管的工作状态 ................................................................ 19 3.8 电容 .................................................................................................. 20

第4章 软件设计 ........................................................................ 22

4.1 Proteus软件 ...................................................................................... 22 4.2 Keil软件 ........................................................................................... 23

4.2.1 Keil C51单片机软件开发的整体结构 .............................. 24

III

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

4.3 Proteus仿真实验结果 ...................................................................... 25

4.3.1 时间显示 ................................................................................ 26 4.3.2 分数显示 ................................................................................ 28 4.3.3 倒计时功能 ............................................................................ 29 4.3.4 24秒报警电路 ........................................................................ 30 4.3.5 第二小节比赛 ........................................................................ 31 4.3.6 交换电路 ................................................................................ 33 4.3.7 按键电路 ................................................................................ 33 4.3.8 复位电路 ................................................................................ 34 4.3.8 晶振电路 ................................................................................ 36

第5章 硬件设计 ........................................................................ 37

5.1 Protel DXP 软件 .............................................................................. 37 5.2 Protel 原理图 ................................................................................... 38

5.2.1 原理图绘制的步骤 ................................................................ 38 5.3 PCB版图 .......................................................................................... 39 5.4制板 ................................................................................................... 40 5.5 焊接、调试 ...................................................................................... 41 5.6实物图 ............................................................................................... 41

结论 .............................................................................................. 45 致谢 .............................................................................................. 46 参考文献 ...................................................................................... 47

IV