1、 1 单片机课程设计报告单片机课程设计报告 设计课题:设计课题:脉冲宽度测量 2 摘要摘要 二十世纪跨越了三个“电”的时代,即电气时代、电子时代和现已进入的电脑时代。但 是, 实际工作中并不是任何需要计算机的场合都要求计算机有很高的性能, 一个控制电冰箱 温度的计算机难道要用 P4 吗?应用的关键是看是否够用,是否有很好的性能价格比。单片 机又称单片微控制器,它不是完成某一个逻辑功能的芯片,而是把一个计算机系统集成到一 个芯片上。概括的讲:一块芯片就成了一台计算机。它的体积小、质量轻、价格便宜、为学 习、应用和开发提供了便利条件。自从 1976 年问世以来,单片机获得了巨大的发展。现在 比较流
2、行的单片机是美国 Intel 的 MCS51/96 以及 Motorola 的 MC 系列,Zilog 的 Z8 系列, 同时还有更多新型的、功能更强的单片机不断出现。 A Abstractbstract:Twentieth century across the three “power” of the era, that the age of electricity, the electronic age and has now entered the computer age. However, the actual work where the computer is not any n
3、eed to require a high performance computer, a control fridge temperature P4 computer do you use? The key is to see whether the application of adequate, whether there is a very good cost performance. Single chip, also known as single-chip microcontroller, it is not the completion of a logic function
4、of the chip, but a computer system integrated into a chip. Speaking in general terms: a single chip into a computer. Its small size, light weight, cheap, for learning, application and development of facilities provided. Since its inception in 1976, SCM was a great development. SCM is now more popula
5、r in the United States, and Motorola, Intels MCS51/96 MC series, Zilogs Z8 series, as well as more new, more powerful microcontrollers continue to emerge. 关键字关键字:单片机,脉冲宽度,系统设计。 3 脉冲宽度测量 目录 第一章 引言4 第二章 方案选择及总体设计4 2.1 硬件技术指标 2.2 方案选择及工作原理 2.3 系统实现功能 第三章 控制系统的硬件设计5 3.1 系统模块构成 3.2 系统工作原理图 3.3 管脚说明 第四章 软
6、件设计及程序8 4.1 软件设计流程 4.2 各子程序功能描述 4.2.1 定时器 T0 中断服务程序 4.2.2 显示子程序 4.3 系统总程序 第五章 系统制作与调试11 5.1 硬件调试 5.1.1 调试方法 5.2 软件调试 5.3 结果分析 第六章 总结与体会 12 第七章 教材及参考书12 4 第一章 引言 近年来随着科技的飞速发展, 单片机的应用正在不断地走向深入, 同时带动传统控制检 测日新月益更新。 在实时检测和自动控制的单片机应用系统中, 单片机往往是作为一个核心 部件来使用,仅单片机方面知识是不够的,还应根据具体硬件结构,以及针对具体应用对象 特点的软件结合,加以完善。本系统采用单片机 A T89C51 为中心器件来设计脉冲宽度测量 器,系统实用性强、操作简单、扩展性强。