乒乓球发球机控制器软件设计_毕业设计
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
乒乓球发球机控制器软件设计
摘要
本文针对乒乓球发球的特点,模拟设计了一种乒乓球发球机控制器。该发球机控制器由8位单片机STC89C51为核心的硬件电路和相关软件编程组合而成。实现改变发球速度、发球高度及角度等的功能,以满足练习者的不同技术需求,同时设置了随机发球模式,实现落球点的随机变化。
本课题的软件设计采用了主函数调用各状态子程序的方法,完成了按键控制、液晶显示、驱动电机调速的功能。配合本组同学的硬件设计完成了单片机外围硬件电路的设计,其中包括电动机驱动模块、键盘模块及液晶显示模块。最后我们在完成硬件电路的分析和软件模块调试的基础上,进行了联机调试,对各模块电路实行软硬件检测,有效地将两者结合起来,完成了系统的整体控制。
关键词:乒乓球发球机,控制器,发球模式,单片机
ABSTRACT
Considering the characteristics of the table tennis served,the thesis designs a kind of table tennis serving controller. It is consist of traditional 8 monolithic integrated circuits STC89C51 for the hardware circuit design and related software C51 for programming design. It can accomplish the function of changing the ball's speed,altitude and angle,in order to satisfy the needs of people. Meanwhile the random serving patten was designed and the fall points of the table tennis become randomly.
The software in this essay is designed using the form that the main function calls a subroutine,and finishing the function of button control,liquid crystal display,drive motor speed regulation.The hardware design produced a peripheral circuit of monolithic integrated circuits including the drive motor module,keyboard module and LCD display module. Finally,on the basis of finishing hardware circuit analysis and software module debug, we match the soft and hardware and test all modules carefully, then the basic function of the system achieves the desired effect.
KEYWORDS: the table tennis serving machine,controller,serving pattern,single chip microcomputer
目录
第一章绪论 (1)
1.1本课题的研究背景和意义 (1)
1.2国内外乒乓球发球机的研究现状 (1)
1.2.1国外乒乓球发球机的研究现状 (2)
1.2.2国内乒乓球发球机的研究现状 (3)
1.3本课题研究内容与设计步骤 (5)
1.3.1本课题研究内容 (5)
1.3.2本课题设计步骤 (5)
第2章乒乓球发球机控制器设计分析 (6)
2.1乒乓球发球机的结构及电动机选择 (7)
2.2主控单片机的选型 (7)
2.2.1单片机的主要特性 (8)
2.3液晶显示芯片的选择 (8)
2.3.1 LCD12864引脚说明 (9)
2.3.2 LCD12864工作时序 (10)
2.4驱动芯片的选择 (11)
2.4.1 L298N引脚说明 (12)
2.5步进电机的调速方法 (13)
2.5.1步进电动机概述 (13)
2.5.2步进电动机的调速 (13)
2.6直流电动机的调速方法 (13)
2.6.1直流电动机概述 (13)
2.6.2直流电动机的调速 (14)
第3章乒乓球发球机控制器硬件设计 (15)
3.1总体设计 (15)
3.2单片机的最小系统 (16)
3.3驱动电路模块 (16)
3.4按键电路模块 (17)
3.5LCD液晶显示电路模块 (18)
第4章乒乓球发球机控制器软件设计 (18)
4.1系统软件设计概述 (18)
4.1.1 软件程序编写的原则 (18)
4.1.2 程序设计方法 (19)
4.1.3 软件设计步骤 (20)
4.2编译软件介绍 (20)
4.3系统各部分流程图 (21)
4.3.1 主程序流程 (21)
4.3.2 LCD12864流程 (22)
4.3.3 按键流程 (24)
4.3.4 电机驱动流程 (25)
4.3.4.1 直流电机驱动流程 (25)
4.3.4.2 步进电机驱动流程 (26)
第5章系统调试 (27)
5.1硬件调试 (27)
5.1.1 硬件静态调试 (27)
5.1.2 硬件动态调试 (28)
5.2软件调试 (28)
5.3联机调试 (29)
5.4调试结果 (30)
第6章结束语 (32)
6.1总结 (32)
6.2心得体会 (33)
致谢 (33)
参考文献 (34)
附录 (35)
附录一硬件实物图 (35)
附录二硬件原理图 (36)
附录三程序 (36)