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

📄 testprog.lst

📁 电除尘行业中监控界面采用ACTIVE 控件的形式
💻 LST
📖 第 1 页 / 共 5 页
字号:
C51 COMPILER V7.00  TESTPROG                                                               11/18/2007 17:17:47 PAGE 1   


C51 COMPILER V7.00, COMPILATION OF MODULE TESTPROG
OBJECT MODULE PLACED IN TestProg.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE TestProg.c LARGE BROWSE MODDP2 DEBUG OBJECTEXTEND

stmt level    source

   1          //      Copyright 2003 HaiYan HighVoltage-Switch Corporation
   2          //      Write by whx1538@sina.com
   3          //      Version: YGK03HV-1.0     2003-11
   4          //
   5          //  07-13 modify mark it out
   6          //--------------------------------------------
   7          //  jp_code == 0x08             取消
   8          //  jp_code == 0x09             设置
   9          //      jp_code == 0x0b         启动/停机
  10          //  jp_code == 0x0c             近控/远控
  11          //  jp_code == 0x0d             确认
  12          //
  13          //--------------------------------------------
  14          #include "def_pin.h"
  15          
  16          
  17          void serio_isr( void) interrupt 4       // 接收串行信息
  18          {
  19   1              if(RI_0)
  20   1              {
  21   2                      RI_0 = 0;
  22   2                      ser_rec[m_r_in] = SBUF0;
  23   2                      m_r_in ++;
  24   2              }
  25   1              TI_0 = 0;
  26   1      }
  27          
  28          //提供触发波形
  29          void t0_isr( void) interrupt 1                                  //timer 0 interrupt
  30          {
  31   1              m_t0_c++;
  32   1              if(m_t0_c == 1) 
  33   1              {                                                                                       //first 270us timer constant
  34   2                      if(m_tc < 1650) return;
  35   2                      U_DRV   = CLEAR;        
  36   2                      TH0     = 0xfd;                                                 //270us
  37   2                      TL0     = 0xe4;                                                 //
  38   2              }       
  39   1              else if (m_t0_c >= m_total_t0||m_tc <2760)
  40   1              {
  41   2                      U_DRV   = SET;
  42   2                      TR0     = CLEAR;
  43   2                      ET0     = CLEAR;
  44   2              }
  45   1              else if( m_t0_c & 1 )                                           //奇数
  46   1              {
  47   2                      U_DRV   = CLEAR;
  48   2                      TH0     = 0xff;                                                 //90us  24MHz
  49   2                      TL0     = 0x4c;                                                 //
  50   2              }
  51   1              else                                                                            //偶数
  52   1              {
  53   2                      U_DRV   = SET;
  54   2                      TH0     = 0xfc;                                                 //450us  24MHz
  55   2                      TL0     = 0x7c;                                                 //
C51 COMPILER V7.00  TESTPROG                                                               11/18/2007 17:17:47 PAGE 2   

  56   2              }
  57   1      }
  58          
  59          //电网参数的起点
  60          void ex0_pulse_isr( void) interrupt 0                   //ex0 interrupt 50hz*2 = 100hz signal
  61          {
  62   1                      //------------------------------1000us   1 ms timer
  63   1                      TR1     = CLEAR;
  64   1                      TH1     = 0Xf8;
  65   1                      TL1     = 0X30;
  66   1                      ET1     = SET;
  67   1                      TR1     = SET;
  68   1                      //---------------------------------------------
  69   1                      TR0     = CLEAR;                                                //关闭定时器0,
  70   1                      ET0     = CLEAR;
  71   1                      U_DRV   = SET;
  72   1                      //---------------------------------------------
  73   1                      m_int_count ++;
  74   1                      m_ms_count = 0;                                                 //毫秒数清零
  75   1      
  76   1                      m_int_count_rec+=1;
  77   1                      
  78   1                      if( m_int_count_rec > 250 )                             //2 seconds without sparking 
  79   1                      {
  80   2                              m_int_count_rec =  250;
  81   2                      }
  82   1      
  83   1                      if(m_tc_max < m_tc) m_tc_max = m_tc;
  84   1              
  85   1                      //对工作方式1的特殊照顾
  86   1                      if(m_get_gzfs == 1 )                                    //对于间歇供电的处理
  87   1                      {
  88   2                              m_pulse_count ++;
  89   2                              if(m_pulse_count > m_get_zkb) m_pulse_count = 1;
  90   2                              if(m_pulse_count > 3) 
  91   2                              {
  92   3                                      m_vol2_old_01 = 0;
  93   3                                      m_vol2_old_10 = 0;
  94   3                              }
  95   2                      }
  96   1                      else if( m_get_gzfs == 4 )                              //对于脉冲供电方式的处理
  97   1                      {
  98   2                              m_pulse_count ++;
  99   2                              if(m_pulse_count > 4) m_pulse_count = 1;
 100   2                      }
 101   1      
 102   1                      if(m_br_fs)     goto NTTT;
 103   1      
 104   1                      m_vol2_new              =  channel(167);//channel(4);                           //首先检测二次电压
 105   1      
 106   1                      if( m_get_gzfs == 4 && m_pulse_count == 2)                      goto next_1555;
 107   1                      if( m_get_gzfs == 4 && m_pulse_count == 4 )
 108   1                      {
 109   2                              if(m_dtj > 109 )
 110   2                              {                               //360          
 111   3                                      if(m_vol2_new + m_get_o36   <  m_vol2_old_10 )
 112   3                                      {
 113   4                                              goto next_155;  //340   
 114   4                                      }
 115   3                              }
 116   2                              else if(m_dtj > 72)
 117   2                              {                               //250           
C51 COMPILER V7.00  TESTPROG                                                               11/18/2007 17:17:47 PAGE 3   

 118   3                                      if( m_vol2_new + m_get_o36  <  m_vol2_old_10 )
 119   3                                      {
 120   4                                              goto next_155;          
 121   4                                      }
 122   3                              }
 123   2                              else
 124   2                              {                                       //250                     
 125   3                                      if( m_vol2_new + m_get_o36  <  m_vol2_old_10 )
 126   3                                      {
 127   4                                              if(m_cur2 > m_cur2_div6)        //div4; 240      &&       m_cur2_new > m_vol2_new + 100 
 128   4                                              {               
 129   5      next_155:                               TR0         = CLEAR;            //关闭定时器0,
 130   5                                                      ET0         = CLEAR;
 131   5                                                      U_DRV           = SET;                  //因为火花,关闭进一步的脉冲
 132   5                                                      m_br_fs         = TRUE;                                                 
 133   5                                                      m_vol2_old_10   = m_vol2_new;
 134   5                                                      return;
 135   5                                              }
 136   4                                      }
 137   3                              }       
 138   2                      }
 139   1                      else
 140   1                      {
 141   2                              if(m_dtj > 109 )
 142   2                              {                               //360          
 143   3                                      if(m_vol2_new + m_get_o109 <  m_vol2_old_10 )
 144   3                                      {
 145   4                                              goto next_15;   //340   
 146   4                                      }
 147   3                              }
 148   2                              else if(m_dtj > 72)
 149   2                              {                               //250           
 150   3                                      if( m_vol2_new + m_get_o72 <  m_vol2_old_10 )
 151   3                                      {
 152   4                                              goto next_15;           
 153   4                                      }
 154   3                              }
 155   2                              else
 156   2                              {                                       //250                     
 157   3                                      if( m_vol2_new + m_get_o36 <  m_vol2_old_10 )
 158   3                                      {
 159   4                                              if(m_cur2 > m_cur2_div6)        //div4; 240      &&       m_cur2_new > m_vol2_new + 100 
 160   4                                              {               
 161   5      next_15:                                TR0         = CLEAR;            //关闭定时器0,
 162   5                                                      ET0         = CLEAR;
 163   5                                                      U_DRV           = SET;                  //因为火花,关闭进一步的脉冲
 164   5                                                      m_br_fs         = TRUE;                                                 
 165   5                                                      m_vol2_old_10   = m_vol2_new;
 166   5                                                      return;
 167   5                                              }
 168   4                                      }
 169   3                              }       
 170   2                      }
 171   1      
 172   1      next_1555:
 173   1                      m_vol2_old_10   = m_vol2_new;   
 174   1              
 175   1                      if(m_br_fs) 
 176   1                      {
 177   2      NTTT:           if(m_br_u2)
 178   2                              {
 179   3                                      ET0 = CLEAR;
C51 COMPILER V7.00  TESTPROG                                                               11/18/2007 17:17:47 PAGE 4   

 180   3                                      ET1 = CLEAR;
 181   3                                      m_temp_data    = channel(231);//channel(5);             //暂时取得二次电流设定值
 182   3                                      m_temp_tempura = channel(135)/11;
 183   3                                      return;
 184   3                              }
 185   2                      
 186   2                              U_DRV = SET;
 187   2                      
 188   2                              //-----------------------
 189   2                              if(m_tc > 8900) m_tc = 8900;            //new adding
 190   2              
 191   2                              if(m_get_gzfs == 1)
 192   2                              {
 193   3                                      if(m_vol2 >8)   m_br_over8= TRUE;
 194   3                                      m_cur2                  =       0;                      //<1>二次电流                   
 195   3                                      //-----------------------------------------------

⌨️ 快捷键说明

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