目 录摘要.....................................................................................11 引言 2 1.1 水位检测仪器的现状和进展前景 2 1.2 本文的结构安排 22 水位监测仪的基本原理 3 2.1 功能说明 3 2.2 整体架构 33 硬件设计 5 3.1 水位检测与数据采集 5 3.2 数码管与 LED 显示 7 3.2.1 相关芯片简介 7 3.2.2 显示部分工作原理 94 系统软件设计 12 4.1 初始化程序 12 4.1.1 I/O 端口方向控制寄存器 12 4.1.2 TMR1 初始化 12 4.1.3 TMR0 初始化 13 4.2 定时/计数器 13 4.2.1 TMR1 中断服务程序 14 4.2.2 TMR0 中断服务程序 15 4.3 数据转换子程序 17结束语 19致 20参考文献 21附录 22 附录 程序清单与注释 22水位检测仪设计摘要:水位检测和显示仪表装置在工业上有着广泛的应用,本文设计了一种能实时检测并显示水位的仪器----水位检测仪。设计主要论述对水位数据采集系统的设计与实现,其主要功能是完成数据采集、处理、显示、数据存储等。根据对数据采集系统体系结构与功能要求的分析,以PIC16F877 单片机为核心设计并实现的采集系统,结合 CD4051 实现对水位的检测,结构简单,实现可靠。在 PIC 单片机中实现了数据存储和处理,猎取了当前的水位,并设计实现了数码管的驱动显示电路。该设计是基于单片机技术设计实现的低功耗水位数据采集装置,是一个具有一定有用性的实时数据采集系统。最后的实验结果验证了水位监测仪的总体设计思路与硬件、软件设计方案正确,能够准确地实现了水位的自动检测。关键词:PIC 单片机;水位检测;LED 显示Design of Water-level Detecting MeterAbstract: Water level detection and display devices has a wide range of applications in industry, this article designa real-time detection and display equipment ---- water level detector.This design focuses on the design and implementation of data acquisition system for the water level,and its main function is to complete the data collection, processing, display, data storage and so on.According to the data acquisition system architecture and functional requirements analysis,the article design and accomplish the acquisition system with si...