文档介绍:摘要
在工程实践中,经常会遇到各种需要测量转速的场合,测量转速的方法分为模拟式和数字式两种。模拟式采用测速发电机为检测元件,得到的信号是模拟量。数字式通常采用光电编码器,霍尔元件等为检测元件,得到的信号是脉冲信号。随着微型计算机的广泛应用,特别是高性能价格比的单片机的出现,转速测量普遍采用以单片机为核心的数字式测量方法。
本课题介绍了一种基于AT89C51单片机平台,采用光电编码器实施转速测量的方法,硬件系统包括脉冲信号产生、脉冲信号的处理和显示模块,并采用汇编语言编程,该方法具有结构简单、精度高、稳定性好的优点。并且还介绍了该测速方法的基本原理、实现方法和软硬件设计。
关键字:AT89C51单片机;转速光电编码器
Abstract
In engineering practice, we often encounter a variety of occasions that need to measure the speed and the speed measurement that is divided into two kinds of analog and digital. Analog tachometer generator for ponents, the resulting signal is analog. monly used optical encoder, the Hall element and other detection devices, the signal is a pulse signal. With the extensive application of puter, especially the emergence of high performance and low cost single-chip speed monly used by the MCU as the core digital measurement method
Th subject based on AT89C51 microcontroller platform, the implementation of the photoelectric encoder speed measurement method, the hardware system includes a pulse signal generated pulse signal processing and display modules, and assembly language programming, this method has a simple structure, high precision good stability advantages. And also describes the basic principles of the velocity measurement method and the hardware and software design.
Keywords: AT89C51 microcontroller; speed; optical encoder
目录
第一章绪论 1
1
2
第二章系统硬件设计 4
4
4
单片机AT89C51介绍 8
8
时钟电路 11
11
12
12
14
14
14
第三章软件设计 16
16
18
第四章系统调试 20
硬件调试 20
软件调试 20
谢辞 23
参考文献 24
附录 25
附录Ⅰ系统电路图 25
附录Ⅱ系统部分代码 26
第一章绪论
随着超大规模集成电路技术的提高,尤其单片机应用技术以其功能强大,价格低廉的显著特点,是全数字化测量转速系统得以广泛应用。由于单片机在测量转速方面具有体积小,性能强,成本低的特点。越来越受企业用户的青睐。转速是工程中应用非常广泛的参数,其测量方法较多,而模拟量的采集和模拟量的处理一直是转速主要的测量方法,这种测量技术已经不能适应现代科技发展的需要。在测量范围和精度上,已不满足大多数系统的使用。随着大规模及超大规模集成电路技术的发展。数字系统测量得到广泛的使用,特别是单片机对脉冲数字信号的强大处理能力,是的全数字测量系统越爱越普及,其转速测量系统也