⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lcdmenu.lst

📁 压缩包中包括多个常用的汇编
💻 LST
字号:
C51 COMPILER V7.09   LCDMENU                                                               10/09/2005 20:45:32 PAGE 1   


C51 COMPILER V7.09, COMPILATION OF MODULE LCDMENU
OBJECT MODULE PLACED IN E:\C51PRJ\APPNEW\LCDMENU.OBJ
COMPILER INVOKED BY: d:\keil\c51\BIN\C51.EXE E:\C51PRJ\APPNEW\LCDMENU.C DB SB OE

line level    source

   1          /****************************************************************************/
   2          /*                                                                          */
   3          /*               Copyright (c) 2005, 老树工作室                             */
   4          /*                   All rights reserved.                                   */
   5          /*                                                                          */
   6          /*      http://www.saintone.net      Email:hxm0902@163.com                  */
   7          /*      QQ:112431149                 Tel:010-62966630                       */
   8          /*                                                                          */
   9          /****************************************************************************/
  10          /****************************************************************************/
  11          /* 文件名:lcdmenu.c                                                        */
  12          /* 版  本:Version 1.0                                                      */
  13          /* 描  述:液晶菜单的设计,通过按键设置温度、湿度、光强的报警阈值           */
  14          /*         及开关量与模拟量的输出                                           */
  15          /* 作  者:spot                                                             */
  16          /* 函  数:                                                                 */
  17          /*                                                                          */
  18          /* 历史记录:                                                               */
  19          /*  spot          2005-08-20     Creat Inital version. (Version 1.0)        */
  20          /****************************************************************************/
  21          #include <reg52.h>
  22          #include <stdio.h>
  23          #include <intrins.h>
  24          #include "../includes/types.h"
  25          #include "../includes/lcd.h"
  26          #include "../includes/com.h"
  27          #include "keyboard.h"
  28          
  29          void key_setmenu_lcd(void);
  30          extern void dac_5615(u_int data_in); /* 写入DAC的10bit输入数据 */
  31          
  32          extern ALARM_DATA_INFO alarm_limit;  /* 报警阈值 */
  33          
  34          u_char set_menu_flag = 0;
  35          u_char set_limit_flag = 0;
  36          
  37          bit temp_layer  = 0;
  38          bit hum_layer   = 0;
  39          bit light_layer = 0;
  40          u_char key_code;
  41          
  42          extern u_int analog_out_data;           /* DAC 输出 */
  43          
  44          sbit CTRL_RELAY = P3^4;        /* 控制继电器开关 */
  45          
  46          /* 液晶上显示键盘设置的温湿度光强报警阈值,及模拟量和开关量输出状态 */
  47          void key_setmenu_lcd(void)
  48          {
  49   1      
  50   1          key_code = scan_key();
  51   1          switch(key_code)
  52   1          {
  53   2              case BUTTON_16:
  54   2                  if (set_menu_flag == 0)
  55   2                  {
C51 COMPILER V7.09   LCDMENU                                                               10/09/2005 20:45:32 PAGE 2   

  56   3                      show_setmenu_a();
  57   3                      set_menu_flag  = 1;
  58   3                      set_limit_flag = 0;
  59   3                  }
  60   2                  else if (set_menu_flag == 1)
  61   2                  {
  62   3                      if (!temp_layer)
  63   3                      {
  64   4                          temp_layer = 1;
  65   4                          show_temp_limit_high(alarm_limit.temp_othreshold, alarm_limit.temp_uthreshold);/* 显示
             -温度阈值设置菜单 */
  66   4                      }
  67   3                      else
  68   3                      {
  69   4                          temp_layer = 0;
  70   4                          show_temp_limit_low(alarm_limit.temp_othreshold, alarm_limit.temp_uthreshold);
  71   4                      }
  72   3                      set_limit_flag = 1;
  73   3                  }
  74   2                  else if (set_menu_flag == 2)
  75   2                  {
  76   3                      if (!hum_layer)
  77   3                      {
  78   4                          hum_layer = 1;
  79   4                          show_analog_limit_high(alarm_limit.analog_othreshold, alarm_limit.analog_uthreshold);/
             -* 显示模入阈值设置菜单 */
  80   4                      }
  81   3                      else
  82   3                      {
  83   4                          hum_layer = 0;
  84   4                          show_analog_limit_low(alarm_limit.analog_othreshold, alarm_limit.analog_uthreshold);
  85   4                      }
  86   3                      set_limit_flag = 2;
  87   3                  }
  88   2                  else if (set_menu_flag == 3)
  89   2                  {
  90   3                      if (!light_layer)
  91   3                      {
  92   4                          light_layer = 1;
  93   4                          show_light_limit_high(alarm_limit.lumin_othreshold, alarm_limit.lumin_uthreshold);/* 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -