基于单片机的自行车里程速度仪设计.doc
文本预览下载声明
基于单片机的自行车里程速度设计
摘 要:众所周知,能源日益损耗,大家都一致追求可持续发展来为子孙后代着想,也为了响应国家号召,自行车作为不损耗任何能源,不对空气造成任何污染,而且能自行车简易方便,还能起到锻炼的作用,所以自行车这一代步工具已经从新回到人们的日常生活的舞台当中。为了让人们在使用更清楚地知道速度、里程等,所以本文主要是关于自行车里程速度计的设计。本设计是以STC89C52单片机为中心控制系统,霍尔传感器为测速模块,并且能用LCD进行显示。主要阐述了自行车里程速度计的整个设计过程,主要包括此设计的硬件的选择、硬件电路的搭建,以及软件的设计等等。软件的设计是主要运用KEIL软件,C语言进行编程,来实现需要。该设计电路设计完好,程序无误。
关键词:单片机;霍尔传感器;LCD;里程速度
Design of Bicycle Speedometer Based on Single Chip
ABSTRACT:As is known to all, increasing energy loss, consistent pursuit of sustainable development to all for the sake of future generations, also in response to national calls and bicycle as no energy loss, without causing any pollution to the air and can bicycle convenient, also can have the effect of exercise, so step bicycle generation tools have back stage of peoples eeveryday life.In order to make people more aware of the speed and the distance of the bicycle, this article mainly focuses on the design of bicycle speedometer.This design is based on the STC89C52 single chip microcontroller, which is a measurement module and can be shown in LCD.Mainly elaborated the whole design process of bicycle mileage speed meter, mainly including the selection of the design of hardware, the construction of the hardware circuit, and software design, and so on.The software is designed primarily with KEIL software, C programming, to achieve the need.The design circuit is well designed and the program is correct.
Key words: Singlechip; Hall sensor; LCD 1602; Speedometer
目录
摘 要 I
ABSTRACT II
1 前言 1
1.1 研究背景 1
1.2 研究意义 1
1.3 国内现状 2
1.4 系统简介 3
2 系统方案设计 4
2.1 系统原理 4
2.2 本设计的任务分析与实现 4
2.3 系统方案选择 5
2.3.1单片机的选择 5
2.3.2 显示设备选择 6
3 硬件设计 8
3.1 单片机系统 8
3.1.1 单片机简介 8
3.1.2 晶振电路 10
.1.3 复位电路 11
3.2 液晶显示 12
3.2.1 液晶屏简介 12
3.2.2 液晶屏与单片机的连接 13
3.2.3 液晶屏显示界面的设计 14
3.3 数据采集电路 14
3.3.1 霍尔传感器简介 14
3.3.2霍尔传感器工作原理 15
3.3.3霍尔传感器测转速或转数 15
3.4 DS1302时钟芯片 15
3.4.1 DS1302时钟芯片简介 15
3.4.2 DS1302 的基本组成 16
3.5蜂鸣器电路 17
3.6独立按键 18
3.6.1按键原理说明 18
3.6.2 速度阈值报警的调整 19
3.7 电源供电电路 19
4 软件设计 20
20
4.2 主程序流程图 21
4. 子程序流程
显示全部