温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,汇文网负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
网站客服:3074922707
基于51单片机的教学实验系统的设计与开发
电气工程专业
基于
51
单片机
教学
实验
系统
设计
开发
电气工程
专业
题目:基于 51 单片机的教学实验系统的设计与开发
THE DESIGN AND DEVELOPMENT OF TEACHING EXPERIMENT
SYSTEM BASED ON 51 MCU Abstract
单片机经过几十年的发展,目前已经广泛应用于生产生活的各个领域。全国高等院校的计算机科学与技术专业和电子信息工程等专业,已经普遍开设了单片机相关的课程。《单片机技术》,《单片机原理与接口技术应用》等课程作为工科专业的必修专业基础课,对教学提出了较高的要求,尤其是实践教学环节。单片机技术的教学必须要有一定课时的高质量的实验课程来配合理论课的教学,只有这样才能使学生更好的掌握单片机的开发,提高动手实践的能力,培养创新精神。但是目前市场上的单片机实验系统普遍价格昂贵,并不能很好的满足单片机的教学。在这样的情况下,构建一个低成本,源代码开放,有完整电路原理图的单片机教学实验系统是非常有必要的。对于提高单片机的教学效果,培养单片机的开发人才具有很大的现实意义。
论文主要完成了以下工作:
1. 分析了目前单片机教学中存在的问题,和目前市场上存在的单片机教学实验系统的现状。提出了构建一种低成本,源代码开放,适合学校单片机教学的51 单片机教学实验系统。
2. 为了解决单片机教学中存在的问题,对单片机教学进行改革,提高单片机的教学效果,使学生能够更好的掌握单片机的开发技术,结合单片机教学大纲的要求,利用宏晶科技公司生产的 STC89C52 单片机为核心,设计完成单片机教学实验系统的硬件开发工作,并且调试成功。提供了所有的硬件电路原理图,以供给单片机教学使用。
3. 结合单片机教学实验系统的硬件和教学需要,开发了一系列的基础类的实验,即基础接口设计实验。同时为了满足创新性教学和太高学生综合设计能力等的需要,开发了一些综合性的实验项目,例如,数字电子钟实验,简易计算器实验,温控系统实验等供教学以及单片机课程设计和毕业设计的使用。所开发的实验项目均提供汇编源代码和 C 源代码,供学生参考。
4. 开发了基于 SST89E564RD 的硬件仿真器。以使学生能够在课堂上学会单片机的硬件仿真调试,真正的掌握单片机的开发技术。
目前本课题已经完成了 51 单片机的教学实验系统的所有的硬件和软件的开发调试工作,经过小规模的试用,证明符合本课题设计的预期,效果良好。
关键词:STC89C52;单片机;实验系统;调试与仿真
THE DESIGN AND DEVELOPMENT OF TEACHING EXPERIMENT SYSTEM BASED ON 51 MCU
Abstract
After several decades of development, now MCU is widely used in all areas of life and production. National institutions and universities of higher learning and technical expertise in computer science and electronic information engineering and other professionals, have widely opened MCU-related courses. "Single-chip technology", "MCU principles and interface technology" and other professional engineering curriculum as a compulsory basic course, the teaching is making higher requirements, especially in practice teaching. MCU technology teaching demands a certain class time of high-quality courses to test the theory with the experiment in teaching. Only in this way the students can better grasp the MCU development, improve the hands –on ability and the creating consciousness. However, the current MCU experimental system from market is generally expensive, and can not meet the relevant teaching well. In such circumstances, It is very necessary to build a MCU experimental teaching system of low-cost and open source code with a complete circuit diagram. It also has great practical significance for improving the teaching effectiveness and the training of concerned human resources.
This thesis has completed the following tasks:
1. The analysis of current problems in MCU teaching and the status of existed MCU experimental teaching system and the proposal to build a system of low-cost, open source code, suitable for teaching as “51 MCU experiment teaching system”.
2. In order to solve the problems in MCU teaching, make some reforms, improve the teaching effectiveness, enable the students to better grasp the development of chip technology, and to combine with the MCU curriculum
requirements, by using STC89C52 produced by HongJing Technology as a core, we designed and completed the development of the system's hardware, and finally successfully debugged. All the hardware circuit diagrams are provided to match the relevant teaching.
3. To meet the demand for MCU hardware and teaching, a series of basic experiments are developed as basic interface design experiment. Meanwhile, in order to meet the innovative teaching and the needs of comprehensive design capabilities for higher level students, a number of comprehensive pilot projects are developed such as digital electronic clock experiment, simple calculator experiment and temperature control system experiment for the use of teaching , curriculum design and graduation design. All the developed experimental projects are provided source code and C source code for students reference.
4. The hardware emluator is developed out based on SST89E564RD to enable the students to learn the hardware simulation debugging of MCU in class and totally grasp the concerned developing technology. Currently, the project has completed the hardware and software development and debugging work of “51 MCU System”. Through a small-scale trial it proved to be complied with the anticipation of this topic and achieved good effects.
Keywords: STC89C52;MCU;Experimental system;Debugging and simulation
目 录
1 绪论 1
1.1 研究背景和意义 1
1.2 研究现状 3
1.3 本文的主要工作 4
2 单片机实验系统总体设计 5
2.1 实验系统的单片机选型 5
2.1.1 选型原则. 5
2.1.2 STC 系列单片机性能简介 6
2.2 系统功能 7
2.2.1 单片机实验系统硬件总体逻辑结构. 7
2.2.2 FLASH 存储技术和 ISP 在系统编程功能 7
2.2.3 单片机实验教学功能. 10
3 系统硬件设计 12
3.1 STC89 单片机最小系统. 12
3.2 发光二极管电路. 13
3.3 键盘电路. 14
3.4 LED 数码管显示电路. 14
3.5 模数转换电路. 15
3.6 数模转换电路. 15
3.7 RS232 串行接口. 16
3.9 I2C 接口电路. 17
3.10 温度传感器接口电路 18
4 系统实验项目设计 19
4.1 本实验系统对单片机实验教学的改进. 19
4.2 单片机 C 语言开发基础 20
4.2.1 利用 C 语言开发单片机的优点. 20
4.2.2 单片机 C 语言 C51 中的基本数据类型和基础语句. 21
4.2.3 单片机 C 语言 C51 的基本结构. 22
4.3 实验系统基本实验程序设计 23
4.4 实验系统综合实验程序设计. 28
4.4.1 数字电子钟实验 28
4.4.2 温控系统实验. 30
5 系统的开发环境及硬件仿真调试 33
5.1 单片机系统开发环境. 33
5.1.1 单片机集成开发环境 KEIL μVision2 33
5.1.2 KEIL C51 μVision2 软件的使用 36
5.2 硬件仿真调试设计 43
5.2.1 单片机 SST89E564RD 作仿真器的