1、 基于单片机的转速检测系统设计与实现 摘 要 本文介绍的是基于单片机的转速检测系统。首先介绍了转速检测 技术的应用领域,技术应用,发展趋势和研究意义;然后深入分析了 转速检测技术的基本原理,同时全面介绍了实现基于单片机的转速检 测系统所需要的硬件和软件;接下来是详细介绍了实现基于单片机的 转速检测系统的硬件电路设计以及软件结构设计;最后对整个系统的 性能进行测试和分析。 整个系统分为硬件设计和软件设计两大模块。硬件部分所使用的 单片机控制芯片 51 单片机开发板,蜂鸣器,6 缝隙码盘,310 电机, WTK-10 光电传感器,5v 直流电源;软件环境选择的是 keil。本设计 要用的方法是光电
2、码盘测速法。 本设计利用单片机实现了准确测量码盘转速,以及测速错误时会 进行声光报警的功能。 关键词:51 单片机;keil;转速检测 Design and Implementation of Speed Detection System Based on SCM Abstract This paper is based on SCM speed detection system. First introduced the application field of speed detection technology, technology application, development t
3、rend and the research significance; And then a deep analysis of the speed detection techniques of basic principle, at the same time, this paper introduces the realization of speed detection system based on single chip microcomputer to hardware and software; The next is introduced based on single chi
4、p realize speed detection system design of hardware circuit and software structure design; At last the whole system performance testing and analysis. The whole system is divided into hardware design and software design two big modules. The hardware of the use of the single chip microcomputer control
5、 chip 51 SCM development board, a buzzer, 6 aperture yards dish, 310 motor, WTK-10 photoelectric sensor, 5 v dc power; The choice is keil software environment. The design of the method is to use light toencoder speed measuring method. This design using single chip microcomputer accurate measurement
6、code salver speed, speed and mistakes are sound and light alarm when the function. Keyword: 51 SCM,keil,speed detection I 目录 1 绪 论 . 1 1.1 转速检测系统概论. 1 1.2 测量转速的应用领域 2 1.3 课题研究目的和意义 5 2 系统总体设计原理 . 7 2.1 转速测量理论的简要介绍 7 2.2 系统开发环境介绍 13 3 系统总体设计方案及硬件设计. 15 3.1 系统总体设计方案. 15 3.2 硬件总体设计 . 15 3.3 硬件具体模块设计. 17 3.3.1 单片机最小系统 17 3.3.2 WTK-10 光电传感器 . 21 3.3.3 键盘输入模块 . 22 3.3.4 数码管显示模块 22 4 系统软件结构及设计 24 4.1 软件流程图 24 4.2 主要模块的设计与实现 25 4.2.1 定时模块 . 25 II 4.2.2 计数模块 . 28 4.2.3 键盘输入模块 29 4.2.4 显示模块 . 32 5 系统测试