单片机压力控制系统设计(000001).pdf

上传人:H****o 文档编号:56669048 上传时间:2022-11-02 格式:PDF 页数:13 大小:290.16KB
返回 下载 相关 举报
单片机压力控制系统设计(000001).pdf_第1页
第1页 / 共13页
单片机压力控制系统设计(000001).pdf_第2页
第2页 / 共13页
点击查看更多>>
资源描述

《单片机压力控制系统设计(000001).pdf》由会员分享,可在线阅读,更多相关《单片机压力控制系统设计(000001).pdf(13页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、第1页/共13页摘要本文从硬件和软件两方面介绍了MCS-51单片机温度控制系统的设计思路,对硬件原理图和程序框图作了简捷的描述。关键词;MCS-51单片机;温度;软硬件;硬件原理图;程序框图;设计单片机是指一个集成在一块芯片上的完整计算机系统。尽管他的大部分功能集成在一块小芯片上,但是它具有一个完整计算机所需要的大部分部件:CPU、内存、内部和外部总线系统,目前大部分还会具有外存。同时集成诸如通讯接口、定时器,实时时钟等外围设备。而现在最强大的单片机系统甚至可以将声音、图像、网络、复杂的输入输出系统集成在一块芯片上。1目的和意义1.1 设计的目的(1)掌握 A/D 和 D/A 转换与单片机的接

2、口连线。(2)了解 A/D 和 D/A 芯片转换性能及编程方法。(3)通过实验了解单片机如何进行数据采集。(4)进一步掌握八段数码管的使用和编程方法。(5)了解八段数码管显示的原理。1.2 设计方案水位控制系统包括水位检测和阀门开度的控制。水位信号可以通过压力传感器检测得到,阀们开度由输出的电压进行控制。采用单片机单片机来控制水箱水位可以更好的达到自动化,可以取得较好的控制效果具体说明如下图1第2页/共13页图 1 2硬件电路的设计2.1 CPU 系统图 2 为主机系统电路图。控制功能一般,程序并不复杂。因此选择 8031 作为 CPU,选择 2732(4K)作为 EPROM,74LS373作

3、为低 8位地址锁存器。图 2 2.2 压力检测系统采用单片机作为数字控制器的处理器,其中,由压力变送器传送来的电流信号经过A/D 转换进入微处理器,经微处理器计算处理,将输出数字量进行D/A 转换送给电动执行机构,具体结构如图3文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A

4、6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8

5、R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB

6、8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM

7、7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2

8、O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:

9、CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9第3页/共13页图3 2.3 水位设

10、定图 4 为键盘输入电路。水位可以在 0 到 3M范围内随意设定,利用键盘设定水位,存储在 51H(键盘输入的数值)与存储在50H(检测的数据)先比较是否相同,如相同,则向DAC0832 发送 0,否则,将两数据相减,然后向DAC0832 发送相减值。DAC0832 根据数值输出控制信号(1-5V)对应阀门开度(0%-100%)图4 2.4 压力显示电路图5为水位显示电路。水位值采用LED 数码显示,每 1s刷新一次显示值。为了不扩展并行 I/O 口,本设计利用串行口的移位功能,扩展为3位静态显示电路。P2.6为输出控制,当 P2.6=1时,允许串行口输出数据给移位寄存器;当P2.6=0时,串

11、行口不能输出数据,显示内容不变。LED3 显示十位水位值,LED2 显示个位水位值,LED1 显示十分位值,小数点固定在LED2 上文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7

12、 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文

13、档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4

14、X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9

15、A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E

16、9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4

17、B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9第4页/共13页图5 3.软件设计根据以上已经具体化的硬件设计,就可以进行软件的总体设计和模块设计。3.1 设计思路由水位传感器检测

18、输入,启动A/D 转换并将转换值暂存50H 单元,将转换得来的十六进制数转换为十进制数,十分、个、十位分别存于35H、36H、37H单元,送由 3 位八段数码管显示。同时将此检测值与设定值(51H)比较,差值大于 2时报警并进行调节处理,差值小于2时,不处理。处理完毕后返回水位采集模块,设定值用外部中断1 方式进行设定。3.2 主程序图 6 为系统总体流程图。将定时器T0,设置为计数器方式,计数初值为最大值为 FFFFH,当键盘键入时,则计数器产生溢出中断。执行中断子程序。主程序ORG 0000H LJMP MAIN ORG 0003H LJMP JPSR ORG 0050H MAIN:MOV

19、 TMOD,#06H ;T0计数器,方式 2 MOV TH0,#0FFH ;置 T0初值 MOV TL0,#0FFH 文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R

20、8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8

21、J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7

22、A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O

23、8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:C

24、B8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 H

25、M7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9第5页/共13页 SETB EA ;开中断 SETB ET0 ;开外部中断 0 SETB TR0 ;开启 T0 LCALL DELAY ;延时 1

26、S LCALL TADC ;调用水位检测子程序 LCALL DISP ;调用水位显示子程序 LCALL CONT ;调用水位控制子程序STMP MAIN 图6为系统总体流程图3.3 水位检测子程序图 7 为水位检测子程序流程图。ADC0809 是 CMOS 工艺的八位逐次比较型A/D转换器。它由 8 选 1 模拟开关,8位 A/D转换器及输出三态缓冲器组成,由三个文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8

27、R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB

28、8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM

29、7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2

30、O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:

31、CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10

32、HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 Z

33、X2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9第6页/共13页地址信号 ADDA、ADDB、ADDC 来决定哪一路模拟信号进行A/D 转换。水位检测值存入 50H,A/D 转用查询方式。水位检测程序如下:ORG 0600H TADC:MOV 50H,#00H MOV DPTR,#7FF8H ;置 0809 通道地址TT0:MOVX DPTR,A ;启动 0809A/D转换 JB INT1,$;等待 A/D 转换结束 MOVX A,DPTR ;读 A/D 转换值 MOV 50H,A RET 图 7 为水位检测子程序流程图3.4 水位控制子程

34、序文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4

35、B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6

36、H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U

37、9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1

38、O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6

39、D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R

40、8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9第7页/共13页图 8 为水位控制子程序流程图。水位控制子程序的功能是将水位测量值(存于 50H)与设定值(存于51H)作比较,是否相同,如相同,则向DAC0832 发送0,否则,将两数据相减,然后向DAC0832 发送相减值。DAC0832 根据数值输出控制信

41、号(1-5V)对应阀门开度(0%-100%)水位检测程序如下CNNT:MOV A,50H SUBB A,51H MOV R1#0FEH MOVX R1 A RET 3.5 水位显示子程序图 8 为水位显示子程序流程图。利用控制微机的串行口,通过串入并出的移位寄存器 74LS164设计 LED显示器接口,尤其当需要远程显示时,采用串行传输会减少数据线数量,提高传输可靠性。本设计利用 74LS164扩展 3 片 LED显示器的接口电路,图中采用的是共阳极LED显示器,74LS164本身吸收电流达 8mA,可以直接驱动 LED显示器,限流电阻值选为390。水位显示子程序如下:ORG 1F00H DI

42、SP:MOV A,50H ;读取检测值 MOV B,#100 DIV AB MOV 37H,A ;十位存于 37H MOV A,B MOV B,#10 DIV A B MOV 36H,A ;个位存于 36H MOV A,B MOV 35H,A ;十分位存于 35H MOV SCON,#00H ;设置串行口方式0 文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM

43、7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2

44、O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:

45、CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10

46、HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 Z

47、X2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编

48、码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X1

49、0 HM7A6D6H9A7 ZX2O8R8U9E9第8页/共13页 CLR ES ;关串行口中断 SETB P2.6 ;允许串行口输出数据 MOV R7,#03H MOV R0,#35H XS:MOV A,R0 ;取显示数 MOV DOTR,#2000H;置段码表首址 MOVC A,A+DPTP ;查询显示码 MOV SUBF,A ;送显示 JNB TI,$;一帧末发送完,等待 CLR IT;清中断标志INT R0 ;取下一个数DJNZ R7,XS RET ORG 2000H TAB:DB 03H,9FH,25H,0DH;0,1,2,3 DB 99H,49H,41H,1FH;4,5,6,7 D

50、B 01H,09H;8,9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9文档编码:CB8J1O4B4X10 HM7A6D6H9A7 ZX2O8R8U9E9

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 高考资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁