摘要:随着居民生活水平的不断提高,自行车不再仅仅是普通的运输、代步的工具,而是成为人们锻炼、娱乐、休闲的首选。人们在骑车锻炼的时候,迫切想知道骑行的速度、踏频及里程等信息。本文以 STC89C521单片机为核心,以霍尔传感器为测速传感器,设计了一种自行车速度里程表,实现对自行车里程及速度的测量,并能将自行车的里程数及速度用LCD实时显示。详细介绍了自行车的速度里程表的硬件电路和软件设计方法,硬件部分利用霍尔传感器将自行车每转一圈的脉冲数传入单片机系统,然后单片机系统将信号经过处理送显示。软件部分用汇编语言进行编程,采用模块化设计思想。对系统进行了安装与调试,结果表明设计的系统能较好实现预定目标。65798
关键词:霍尔元件;单片机;LCD显示
Abstract:With the developing of people’s life, the bicycle is not only the universal tool of transportation and substitute for walking, but becomes the first choice of entertainment and exercising. When people are riding bikes urgently want to know the speed,the rate and the mileage of riding. In this paper, the bicycle mileage/speed design based on the Hall element is elaborated. By STC89C51 as kernel, using Hall element to measure revolution, the measure and statistic are achieved.The power is off, the bicycle speed can be displayed on LCD. In this article, the hardware circuit and software design of bicycle mileage/speed instrument are introduced in detail. About the hardware, the pulse number is transmitted of one cycle of the bicycle into Single Chip Microcomputer system. Then the signal processed by Single Chip Microcomputer system is sent to display scream. About the software, in assemble language; the program is designed in the mode of modules. The system has been installed and debugged, the result proved that the designed system can achieve the intended goal.
Key Words: Hall element; Single chip microcomputer; LCD
目 录
1 绪论 4
1.1 选题背景 4
1.2 课题研究意义 4
2 自行车的速度里程表总方案设计 4
2.1 任务分析与实现 4
2.2 自行车的速度里程表硬件方案设计 5
2.3 自行车的速度里程表软件方案设计 6
3 自行车的速度里程表硬件电路设计 7
3.1 概述 7
3.2 传感器及信号调理电路设计 7
3.3 单片机子系统设计 8
3.4 电源模块设计 10
3.5 LCD1602液晶显示 11
3.6 超速报警电路的设计 11
3.7 电机电路的设计 12
3.8 总电路的设计 12
4 自行车的速度里程表软件程序设计 14
4.1 概述 14
4.2 自行车的速度里程表总体程序设计 14
4.3 中断子程序的设计 15
4.4 数据处理子程序的设计 16
4.5 显示子程序的设计 STC89C521单片机自行车速度里程表的设计+电路图:http://www.751com.cn/zidonghua/lunwen_73514.html