《2022年多路监控报警系统单片机课程设计2.docx》由会员分享,可在线阅读,更多相关《2022年多路监控报警系统单片机课程设计2.docx(29页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、精品学习资源单片机课程设计 多路监控报警系统欢迎下载精品学习资源多路监控报警系统一、试验目地1. 明白 A/D 芯片TLC0809 转换性能及编程方法 .2. 把握 A/D 转换器与单片机地接口方法3. 学会使用 A/D 转换器进行电压信号采集.二、设计任务及要求利用串行模 /数转换芯片 TLC0809 、SST89E58 及液晶显示器,设计完成一个数字电压多路监控报警系统.要求: 数字电压多路监控报警系统可测量05V 输入电压,电压值通过液晶轮番显示,并依据设置地限定值对输入超出额度地路端警报提示.三、工作原理及设计思路多路监控报警系统地设计由A/D 转换、数据处理及显示掌握等组成.A/D
2、转换由集成电路 TLC0809 完成,利用 TLC0809 将模拟电压转换为数字量,经单片机将数字量转换成对应地电压值,并通过液晶显示输出.四、系统特点本系统可以每一路独立设置最高最低地电压值,并对每一路电压进行监控报警, 对超出范畴内地电路显示对应路值,并用LED 灯和蜂鸣器表示不同地路值.五、硬件电路设计及原理1、ADC0809(1) 、ADC0809 管脚图准时序图:欢迎下载精品学习资源该ADC0809 数据采集部分是单片 CMOS 器件,它具有 8位模拟数字转换器, 8通道多路复用器和微处理器兼容掌握规律 .8位A / D转换器采纳逐次靠近作为转换技术 .依据时序电路地分析,可以完成单
3、片机编程 .该系统在工作时,单片机将产生串行时钟,并按时序发送和接受数据位 .由上图可知, ADC0809 由一个 8路模拟开关、一个地址锁存与译码器、一个A/D 转换器和一个三态输出锁存器组成.多路开关可选通 8个模拟通道,答应 8路模拟量分时输入,共用A/D 转换器进行转换 .三态输出锁器用于锁存A/D 转换完地数字量,当OE端为高电平常, 才可以从三态输出锁存器取走转换完地数据.IN0 IN7 :8条模拟量输入通道ADC0809 对输入模拟量要求:信号单极性,电压范畴是0 5V ,如信号太小,必需进行放大;输入地模拟量在转换过程中应当保持不变,如如模拟量变化太快,就需在输入前增加采样保持
4、电路. 地址输入和掌握线:4条 ALE 为地址锁存答应输入线,高电平有效.当ALE 线为高电平常, 地址锁存与译码器将A , B, C三条地址线地地址信号进行锁存,经译码后被选中地通道地模拟量进转换器进行转换.A, B和C为地址输入线,用于选通IN0 IN7 上地一路模拟量输入.数字量输出及掌握线:11条 ST为转换启动信号.当ST上跳沿时,全部内部寄存器清零;下跳沿时,开头进行 A/D 转换;在转换期间,ST应保持低电平 .EOC 为转换终止信号 .当EOC 为高电平常,说明转换终止;否就,说明正在进行A/D 转换 .OE为输出答应信号,用于掌握三条输出锁存器向单片机输出转换得到地数据.OE
5、 1,输出转换得到地数据;OE 0,输出数据线呈高阻状态.D7 D0 为数字量输出线 . CLK 为时钟输入信号线.因ADC0809 地内部没有时钟电路,所需时钟信号必需由外界供应,通常使用频率为500KHZ , VREF (), VREF ()为参考电压输入.(2) 、ADC0809 应用说明ADC0809 内部带有输出锁存器,可以与AT89S51 单片机直接相连,初始化时,使ST和OE信号全为低电平,送要转换地哪一通道地地址到A , B, C端口上,在 ST端给出一个至少有100ns宽地正脉冲信号,是否转换完毕,我们依据EOC信号来判定,当 EOC变为高电平常,这时给OE为高电平,转换地数
6、据就输出给单片机了.2、SST89E58RD1 、SST89E58RD管脚图:欢迎下载精品学习资源3、1602液晶引脚功能说明第1脚: VSS为电源地,接 GND. 第2脚: VDD 接5V 正电源 . 第3脚: VL 为液晶显示器对比度调整端,接正电源时对比度最弱,接地电源时对比度最高. 第4脚: RS为寄存器挑选, 高电平常挑选数据寄存器、低电平常挑选指令寄存器. 第5脚: RW 为读写信号线,高电平常进行读操作,低电平常进行写操作.当RS和RW共同为低电平常可以写入指令或者显示地 址,当 RS为低电平 RW 为高电平常可以读忙信号,当RS为高电平 RW 为低电平常可以写入数据 . 第6脚
7、: E端为使能端,当 E端由高电平跳变成低电平常,液晶模块执行命令 . 第7 14 脚: D0 D7 为8位双向数据线 . 第15脚: BLA 背光电源正极 +5V 输入引脚 . 第16脚: BLK 背光电源负极,接 GND.序号指令RSR/WD7D6D5D4D3D2D1D01清显示00000000012光标返回000000001*3置输入模式00000001I/DS4显示开 /关掌握0000001DCB5光标或字符移位000001S/CR/L*6置功能00001DLNF*置字符发生存贮器地址字符发生存贮器地址700018置数据存贮器地址001显示数据存贮器地址9读忙标志或地址01BF计数器地
8、址欢迎下载精品学习资源写数到 CGRAM 或10DDRAM )要写地数据内容10欢迎下载精品学习资源欢迎下载精品学习资源从 CGRAM 或 DDRAM11读数读出地数据内容11欢迎下载精品学习资源指令 1:清显示,指令码 01H, 光标复位到地址00H 位置 指令 2:光标复位,光标返回到 地址 00H 指令 3:光标和显示模式设置I/D :光标移动方向,高电平右移,低电平左移S:屏幕上全部文字是否左移或者右移.高电平表示有效,低电平就无效指令 4:显示开关掌握 .D:掌握整体显示地开与关,高电平表示开显示,低电平表示关显示C:掌握光标地开与关,高电平表示有光标,低电平表示无光标B :掌握光标
9、是否闪耀,高电平闪耀,低电平不闪耀 指令 5:光标或显示移位S/C:高电平常移动显示地文字,低电平常移动光标指令6:功能设置命令DL :高电平常为 4位总线,低电平常为8位总线 N :低电平常为单行显示,高电平常双行显示F: 低电平常显示 5x7地点阵字符,高电平常显示5x10 地点阵字符 指令7:字符发生器RAM 地址设置 指令 8 : DDRAM 地址设置 指令 9:读忙信号和光标地址读状态输入RS=L , R/W=H ,E=H输出D0 D7= 状态字写指令输入RS=L , R/W=L , D0 D7= 指令码, E=高脉 输出冲无读数据输入RS=H ,R/W=H , E=H输出D0 D7
10、= 数据写数据输入RS=H ,R/W=L , D0 D7= 数据, E=高脉冲输出无BF:为忙标志位,高电平表示忙,此时模块不能接收命令或者数据,假如为低电平表示不忙. 指令 10:写数据 指令 11:读数据 .五、软件设计主程序设计:1) A/D 转换程序每次 5组电压值构成一个数组,数组中地值为AD 进入值 50次地平均值 .2) 数据处理程序:可以说是整个程序设计地最难点,数据处理显示地电压值运算公式:V= ( A*500 )/255,(其中 A 为经 0809转换后所得地数字量)这样使得运算出来地数值为整型,防止了浮点数运算复杂地缺点,在之后地显示中加入小数点即可.子程序设计:由于 C
11、语言地子程序功能比较强大,所以本程序调用相关子程序,削减了许多编程地繁琐,相关子程序功能如下所示:函数功能 :400ms延时延时 函数功能 :5ms延时 函数功能 :1602A 按指定位置显示一个字符函数功能 :1602A 初始化函数功能 :1602A 读状态 函数功能 :1602A 写指令函数功能 :1602A 读数据函数功能 :1602A 写数据 作用: AD0809 通道挑选采样值流程图:欢迎下载精品学习资源开头初始化液晶初始化 ADC0809For i=0 ;i5 ;i+采集一路电压显示 Warning同 时蜂鸣器响、红灯亮上溢出?上溢出下溢出?显 示 Warning 同时蜂鸣器响、红
12、灯亮显示第 i 路电压下溢出?是否有进入设置按键否是进入设置限定值界面设置各个通道地高低值设置最高戒备值设置最低戒备值是否有 back 键按下各路设置后进入主程序显示各路电压值六、 系统 C程序依据上述软 /硬件地设计,编写好地源程序如下:/* ADC0809 地多路电压监视器* ADC0809+1602LCD+单片机* 作者:于萱格欢迎下载精品学习资源*/ #include#include #include #include #include#define SYSTEM_OSC12000000/定义晶振频率 12000000HZ#define SOUND_SPACE间隔4/5/定义一般音符演
13、奏地长度分率,/每 4分音符#define uchar unsigned char#define uint unsigned int#define LCM_Data P2/ 数据接口sbit ST = P00 ;/file:/ 片选端sbit EOC = P01 ; / file:/ 时钟端sbit OE = P02 ;/file:/ 数据输入输出复用sbit A = P03 ;sbit b = P05 ;sbit C = P06 ;sbit LCM_E=P35 ;/定义接口sbit LCM_RW=P36 ;sbit LCM_RS=P37 ;sbit LED_GREEN=P31 ; /定义绿灯
14、地口sbit LED_RED=P30 ;/ 定义红灯地口sbit BeepIO=P34 ;/定义输出管脚sbit EX_0=P32 ;/ 外部中断 INTO sbit EX_1=P33 ;/ 外部中断 INT1 sbit B_UP=P07 ;/ 定义外部按键 1sbit B_DOWN=P04 ;/ 定义外部按键 2void LCM_WriteDatauchar WDLCM;void LCM_WriteCommanduchar WCLCM,BuysC;uchar LCM_ReadDatavoid ;uchar LCM_ReadStatusvoid ;void LCM_Initvoid;void
15、DisplayOneCharuchar X, uchar Y , uchar DData ; void DisplayListCharuchar X, uchar Y, uchar code *DData ;void Delay5Msvoid ;void Delay400Msvoid ;void initvoid ;/AD0809 初始化void ADuint M; / 挑选通道来显示欢迎下载精品学习资源void Delayuint m ;/AD0809 专用延时char B_UP_CHECKvoid; /向上按键去抖char B_DOWN_CHECKvoid;/向下按键去抖void Init
16、ialSoundvoid;void Delay1msunsigned int count ;voidPlayunsignedchar*Sound,unsignedcharSignature,unsignedOctachord,unsignedint Speed;uchar code uctech10 = 0,1,2,3,4,5,6,7,8,9;unsigned int code FreTab12 = 262,277,294,311,330,349,369,392,415,440,466,494 ; / 原始频率表unsigned char code SignTab7 = 0,2,4,5,7,9
17、,11 ;/17 在频率表中位置置unsigned char code LengthTab7= 1,2,4,8,16,32,64 ;unsigned char Sound_Temp_TH0,Sound_Temp_TL0 ;/音符定时器初值暂存unsigned char Sound_Temp_TH1,Sound_Temp_TL1 ;/音长定时器初值暂存/int func=0,func_ok=0,max_value=130,min_value=50;int AD_DATA ;uchar code net = Running; /7uchar code net1 = Set_Max_Value; /
18、13 uchar code net2 = Set_Min_Value; /13 uchar code net3 = Hello World.; /7 uchar code net4 = Now_Value:; /9 uchar code net5 = WARNNING.; /9 uchar code net6 = CH; /9int func=0,func_ok=0 ;uint max_value5=200,200,200,200,200;uint min_value5=0,0,0,0,0;/*Music*/挥着翅膀地女孩unsigned char code Music_Girl= 0x17,
19、0x02, 0x17,0x03, 0x18,0x03, 0x19,0x02, 0x15,0x03, 0x16,0x03, 0x17,0x03, 0x17,0x03, 0x17,0x03, 0x18,0x03,0x19,0x02, 0x16,0x03, 0x17,0x03, 0x18,0x02, 0x18,0x03,0x17,0x03, 0x15,0x02, 0x18,0x03, 0x17,0x03, 0x18,0x02,0x10,0x03, 0x15,0x03, 0x16,0x02, 0x15,0x03, 0x16,0x03,0x17,0x02, 0x17,0x03, 0x18,0x03, 0
20、x19,0x02, 0x1A,0x03,0x1B,0x03, 0x1F,0x03, 0x1F,0x03, 0x17,0x03, 0x18,0x03,0x19,0x02, 0x16,0x03, 0x17,0x03, 0x18,0x03, 0x17,0x03,欢迎下载精品学习资源/同一首歌0x18,0x03, 0x1F,0x03, 0x1F,0x02, 0x16,0x03, 0x17,0x03,0x18,0x03, 0x17,0x03, 0x18,0x03, 0x20,0x03, 0x20,0x02,0x1F,0x03, 0x1B,0x03, 0x1F,0x66, 0x20,0x03, 0x21,
21、0x03,0x20,0x03, 0x1F,0x03, 0x1B,0x03, 0x1F,0x66, 0x1F,0x03,0x1B,0x03, 0x19,0x03, 0x19,0x03, 0x15,0x03, 0x1A,0x66,0x1A,0x03, 0x19,0x03, 0x15,0x03, 0x15,0x03, 0x17,0x03,0x16,0x66, 0x17,0x04, 0x18,0x04, 0x18,0x03, 0x19,0x03,0x1F,0x03, 0x1B,0x03, 0x1F,0x66, 0x20,0x03, 0x21,0x03,0x20,0x03, 0x1F,0x03, 0x1
22、B,0x03, 0x1F,0x66, 0x1F,0x03,0x1B,0x03, 0x19,0x03, 0x19,0x03, 0x15,0x03, 0x1A,0x66,0x1A,0x03, 0x19,0x03, 0x19,0x03, 0x1F,0x03, 0x1B,0x03,0x1F,0x00, 0x1A,0x03, 0x1A,0x03, 0x1A,0x03, 0x1B,0x03,0x1B,0x03, 0x1A,0x03, 0x19,0x03, 0x19,0x02, 0x17,0x03,0x15,0x17, 0x15,0x03, 0x16,0x03, 0x17,0x03, 0x18,0x03,0
23、x17,0x04, 0x18,0x0E, 0x18,0x03, 0x17,0x04, 0x18,0x0E,0x18,0x66, 0x17,0x03, 0x18,0x03, 0x17,0x03, 0x18,0x03,0x20,0x03, 0x20,0x02, 0x1F,0x03, 0x1B,0x03, 0x1F,0x66,0x20,0x03, 0x21,0x03, 0x20,0x03, 0x1F,0x03, 0x1B,0x03,0x1F,0x66, 0x1F,0x04, 0x1B,0x0E, 0x1B,0x03, 0x19,0x03,0x19,0x03, 0x15,0x03, 0x1A,0x66
24、, 0x1A,0x03, 0x19,0x03,0x15,0x03, 0x15,0x03, 0x17,0x03, 0x16,0x66, 0x17,0x04,0x18,0x04, 0x18,0x03, 0x19,0x03, 0x1F,0x03, 0x1B,0x03,0x1F,0x66, 0x20,0x03, 0x21,0x03, 0x20,0x03, 0x1F,0x03,0x1B,0x03, 0x1F,0x66, 0x1F,0x03, 0x1B,0x03, 0x19,0x03,0x19,0x03, 0x15,0x03, 0x1A,0x66, 0x1A,0x03, 0x19,0x03,0x19,0x
25、03, 0x1F,0x03, 0x1B,0x03, 0x1F,0x00, 0x18,0x02,0x18,0x03, 0x1A,0x03, 0x19,0x0D, 0x15,0x03, 0x15,0x02,0x18,0x66, 0x16,0x02, 0x17,0x02, 0x15,0x00, 0x00,0x00;欢迎下载精品学习资源unsigned char code Music_Same= 0x0F,0x01, 0x15,0x02, 0x16,0x02, 0x17,0x66, 0x18,0x03, 0x17,0x02, 0x15,0x02, 0x16,0x01, 0x15,0x02, 0x10,
26、0x02,0x15,0x00, 0x0F,0x01, 0x15,0x02, 0x16,0x02, 0x17,0x02,0x17,0x03, 0x18,0x03, 0x19,0x02, 0x15,0x02, 0x18,0x66,0x17,0x03, 0x19,0x02, 0x16,0x03, 0x17,0x03, 0x16,0x00,0x17,0x01, 0x19,0x02, 0x1B,0x02, 0x1B,0x70, 0x1A,0x03,0x1A,0x01, 0x19,0x02, 0x19,0x03, 0x1A,0x03, 0x1B,0x02,0x1A,0x0D, 0x19,0x03, 0x1
27、7,0x00, 0x18,0x66, 0x18,0x03,0x19,0x02, 0x1A,0x02, 0x19,0x0C, 0x18,0x0D, 0x17,0x03,0x16,0x01, 0x11,0x02, 0x11,0x03, 0x10,0x03, 0x0F,0x0C,0x10,0x02, 0x15,0x00, 0x1F,0x01, 0x1A,0x01, 0x18,0x66,0x19,0x03, 0x1A,0x01, 0x1B,0x02, 0x1B,0x03, 0x1B,0x03,0x1B,0x0C, 0x1A,0x0D, 0x19,0x03, 0x17,0x00, 0x1F,0x01,0
28、x1A,0x01, 0x18,0x66, 0x19,0x03, 0x1A,0x01, 0x10,0x02,0x10,0x03, 0x10,0x03, 0x1A,0x0C, 0x18,0x0D, 0x17,0x03,欢迎下载精品学习资源/两只蝴蝶0x16,0x00, 0x0F,0x01, 0x15,0x02, 0x16,0x02, 0x17,0x70,0x18,0x03, 0x17,0x02, 0x15,0x03, 0x15,0x03, 0x16,0x66,0x16,0x03, 0x16,0x02, 0x16,0x03, 0x15,0x03, 0x10,0x02,0x10,0x01, 0x11,
29、0x01, 0x11,0x66, 0x10,0x03, 0x0F,0x0C,0x1A,0x02, 0x19,0x02, 0x16,0x03, 0x16,0x03, 0x18,0x66,0x18,0x03, 0x18,0x02, 0x17,0x03, 0x16,0x03, 0x19,0x00,0x00,0x00 ;欢迎下载精品学习资源unsigned char code Music_Two = 0x17,0x03, 0x16,0x03, 0x17,0x01, 0x16,0x03, 0x17,0x03, 0x16,0x03, 0x15,0x01, 0x10,0x03, 0x15,0x03, 0x1
30、6,0x02,0x16,0x0D, 0x17,0x03, 0x16,0x03, 0x15,0x03, 0x10,0x03,0x10,0x0E, 0x15,0x04, 0x0F,0x01, 0x17,0x03, 0x16,0x03,0x17,0x01, 0x16,0x03, 0x17,0x03, 0x16,0x03, 0x15,0x01,0x10,0x03, 0x15,0x03, 0x16,0x02, 0x16,0x0D, 0x17,0x03,0x16,0x03, 0x15,0x03, 0x10,0x03, 0x15,0x03, 0x16,0x01,0x17,0x03, 0x16,0x03, 0
31、x17,0x01, 0x16,0x03, 0x17,0x03,0x16,0x03, 0x15,0x01, 0x10,0x03, 0x15,0x03, 0x16,0x02,0x16,0x0D, 0x17,0x03, 0x16,0x03, 0x15,0x03, 0x10,0x03,0x10,0x0E, 0x15,0x04, 0x0F,0x01, 0x17,0x03, 0x19,0x03,0x19,0x01, 0x19,0x03, 0x1A,0x03, 0x19,0x03, 0x17,0x01,0x16,0x03, 0x16,0x03, 0x16,0x02, 0x16,0x0D, 0x17,0x03
32、,0x16,0x03, 0x15,0x03, 0x10,0x03, 0x10,0x0D, 0x15,0x00,0x19,0x03, 0x19,0x03, 0x1A,0x03, 0x1F,0x03, 0x1B,0x03,0x1B,0x03, 0x1A,0x03, 0x17,0x0D, 0x16,0x03, 0x16,0x03,0x16,0x0D, 0x17,0x01, 0x17,0x03, 0x17,0x03, 0x19,0x03,0x1A,0x02, 0x1A,0x02, 0x10,0x03, 0x17,0x0D, 0x16,0x03,0x16,0x01, 0x17,0x03, 0x19,0x
33、03, 0x19,0x03, 0x17,0x03,0x19,0x02, 0x1F,0x02, 0x1B,0x03, 0x1A,0x03, 0x1A,0x0E,0x1B,0x04, 0x17,0x02, 0x1A,0x03, 0x1A,0x03, 0x1A,0x0E,0x1B,0x04, 0x1A,0x03, 0x19,0x03, 0x17,0x03, 0x16,0x03,0x17,0x0D, 0x16,0x03, 0x17,0x03, 0x19,0x01, 0x19,0x03,0x19,0x03, 0x1A,0x03, 0x1F,0x03, 0x1B,0x03, 0x1B,0x03,0x1A,
34、0x03, 0x17,0x0D, 0x16,0x03, 0x16,0x03, 0x16,0x03,0x17,0x01, 0x17,0x03, 0x17,0x03, 0x19,0x03, 0x1A,0x02,0x1A,0x02, 0x10,0x03, 0x17,0x0D, 0x16,0x03, 0x16,0x01,0x17,0x03, 0x19,0x03, 0x19,0x03, 0x17,0x03, 0x19,0x03,0x1F,0x02, 0x1B,0x03, 0x1A,0x03, 0x1A,0x0E, 0x1B,0x04,0x17,0x02, 0x1A,0x03, 0x1A,0x03, 0x
35、1A,0x0E, 0x1B,0x04,0x17,0x16, 0x1A,0x03, 0x1A,0x03, 0x1A,0x0E, 0x1B,0x04,0x1A,0x03, 0x19,0x03, 0x17,0x03, 0x16,0x03, 0x0F,0x02,0x10,0x03, 0x15,0x00, 0x00,0x00 ;void Delay1msunsigned int count欢迎下载精品学习资源unsigned int i,j ;fori=0 ; icount ;i+ forj=0 ; j ;Delay5Ms ;forj=0 ; j ;Delay5Ms ;InitialSound ;EX0
36、=1 ;/开外部中断 0EX1=1 ;/开外部中断 1 EA=1 ;/开总中断LCM_WriteCommand0x01,1; / 显示清屏Delay400Ms ;DisplayListChar4, 0, net ;/显示 Runing/以下为主循环while1LED_GREEN=0 ;/ 绿灯灭LED_RED=0 ;/红灯灭BeepIO=1 ;fory=0 ;y5 ;y+/5 路扫描显示forx=0 ;x5 ; x+ / 五路电压扫描欢迎下载精品学习资源forj=0 ;jmax_valuex LCM_WriteCommand0x01,1; /显示清屏Delay5Ms ;Delay5Ms ;Di
37、splayListChar3, 0, net5 ;/ 显示WARNNING. DisplayListChar0, 1, net6 ;/显示 CHDisplayOneChar2, 1, : ;DisplayOneChar3, 1, uctechx+1 ;Delay400Ms ;ifx=0LED_GREEN=0 ;LED_RED=1 ;PlayMusic_Girl,0,3,360 ;ifx=1LED_GREEN=1 ;LED_RED=0 ;PlayMusic_Same,0,3,360 ;ifx=2LED_GREEN=1 ;LED_RED=1 ;PlayMusic_Two,0,3,360 ;forj
38、=0 ;j50 ;j+/ 连续扫描本路电压ADx ;i+=AD_DATA;i/=50 ;欢迎下载精品学习资源m=i*500/256 ;nx=unsigned intm ;if nxmax_valuex LCM_WriteCommand0x01,1; / 显示清屏Delay5Ms ;Delay5Ms ;DisplayListChar4, 0, net ;/显示 Runing/DisplayListChar0, 1, net4 ;/显示 Now_Value: break;/* 以下为判定电压有没有下溢出*/while nxmin_valuex LCM_WriteCommand0x01,1; /显示
39、清屏Delay5Ms ;Delay5Ms ;DisplayListChar3, 0, net5 ;/ 显示WARNNING. DisplayListChar0, 1, net6 ;/显示 CHDisplayOneChar2, 1, : ;DisplayOneChar3, 1, uctechx+1 ;Delay400Ms ;ifx=0LED_GREEN=0 ;LED_RED=1 ;PlayMusic_Girl,0,3,360 ;ifx=1LED_GREEN=1 ;LED_RED=0 ;PlayMusic_Same,0,3,360 ;ifx=2LED_GREEN=1 ;LED_RED=1 ;Pla
40、yMusic_Two,0,3,360 ;forj=0 ;jmin_valuex LCM_WriteCommand0x01,1; / 显示清屏Delay5Ms ;Delay5Ms ;DisplayListChar4, 0, net ;/显示 Runing/DisplayListChar0, 1, net4 ;/显示 Now_Value: break;/* 以下为设置各个通道地高低值*/设置最高戒备值whilefunc=1LCM_WriteCommand0x01,1; /显示清屏Delay5Ms ;Delay5Ms ;while1DisplayListChar0, 0, net1 ; / 显示Set_Max_Value DisplayListChar0, 1, net6 ;/显示 CH DisplayOneChar2, 1, uctechfunc ;DisplayOneChar3, 1, : ;ifB_UP_CHECKmax_valuefunc-1+ ;ifB_DOWN_CHECKmax_valuefunc-1- ;