四川师范大学成都学院本科毕业设计
四川师范大学成都学院本科毕业设计
—篮球比赛计时计分器设计
学生姓名 学 号 所 在 系 专业名称 班 级 指导教师
通信工程系 通信工程 2010级一班
四川师范大学成都学院 二○一二年十一月
四川师范大学成都学院本科毕业设计
篮球比赛计时计分器设计
学生: 指导教师:
内容摘要:篮球比赛计时计分器是为了解决篮球比赛时计分与计时准确方便,灵活适
用的问题。此装置利用单片机AT89S52完成了计时和计分的功能。本文详细地介绍了系统硬件与软件的设计过程,采用该装置可根据实际情况进行比分修改和时间的准确显示,具有低功耗,可靠性,安全性以及低成本等特点。
关键词:单片机 篮球赛 LCD
I
四川师范大学成都学院本科毕业设计
The design of game timing and scoring device
Abstract: This ‘game timing and scoring device’ is designed to solve the
game scoring and the precision timing problem . This device is completed by using microcontroller AT89S52 for timing and scoring functions. This paper introduces the hardware and software’s designing process,
this device can be modified according to the actual situation and the time of the accurate score, and the current information will be displayed on the LCD screen with low power consumption, reliability, safely , low cost and so on. Key words: Single Chip Microcomputer, game, scoring, precision timing, LCD.
Keywords: Single Chip Microcomputer basketball LCD
.
II
四川师范大学成都学院本科毕业设计
目 录
1 绪论 .................................................................. 1 1.1 背景知识介绍 ....................................................... 1 1.2 设计内容 ........................................................... 1 1.3 设计任务和要求 ..................................................... 2 1.4 设计意义 ........................................................... 2 2 系统总体方案设计及硬件设计介绍 ........................................ 2 2.1 系统总体方案设计 .................................................... 2 2.2 硬件电路设计 .................................................... 3 2.2.1 系统控制中心单片机AT89S52简介 ................................. 3 2.2.2 时钟电路模块 .................................................. 5 2.2.3 复位电路模块 .................................................. 6 2.2.4 显示模块 ...................................................... 6 2.2.5 报警模块 ...................................................... 7 2.2.6 系统电源设计 .................................................. 8 2.2.7 ISP下载线接口 ................................................. 8 2.2.8 键盘接口 ...................................................... 9 2.3 系统硬件电路总电路图 ............................................... 9 3 软件设计 ............................................................. 10 3.1 软件设计环境介绍 .................................................. 11 3.2 软件总体设计方案 .................................................. 11 3.2.1 延时子函数 ................................................... 12 3.2.2 液晶显示分数刷新子程序 ....................................... 12 3.2.3 T0中断程序 ................................................... 14 3.2.4 设置时间子函数 ............................................... 15 4 PROTEUS仿真实验效果 .................................................. 16 5 总结 ................................................................. 17 6 致 谢 ............................................................... 17
III
四川师范大学成都学院本科毕业设计
附录:源程序 ............................................................ 19 参考文献: .............................................................. 31
IV