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

📄 pulseparse.lst

📁 个人学习参考!禁止使用到产品上! 任何人不得公开发布!
💻 LST
字号:
C51 COMPILER V7.10   PULSEPARSE                                                            02/03/2005 10:45:41 PAGE 1   


C51 COMPILER V7.10, COMPILATION OF MODULE PULSEPARSE
OBJECT MODULE PLACED IN pulseparse.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE pulseparse.c OPTIMIZE(7,SIZE) BROWSE INCDIR(E:\WorkHome\932-DDSF\DDSF-932-0
                    -02\;F:\WorkHome\932-DDSF\DDSF-932-003\) DEBUG OBJECTEXTEND

line level    source

   1          /*========================================*/
   2          /*系统名称:DDSF-CECG-JiangSu             */
   3          /*函数名称:脉冲采集                          */
   4          /*程序编写:步爱军                                    */
   5          /*开始日期:2005-01-01                            */
   6          /*完成日期:                                          */
   7          /*修改记录:                                          */
   8          /*软件版本:DDSF-CECG-002                 */
   9          /*版本说明:用户数据保存在外部            */
  10          /*外部器件:LM75、AT24C02、HT1621、LPC932 */
  11          /*          R8025、ADE7755                */
  12          /*========================================*/
  13          
  14          #include <REG932.H>
  15          #include <define.h>
  16          #include <Stdio.h>
  17          #include <Intrins.h>
  18          //数据累加
  19          void SumData(void)
  20          {
  21   1          //总电量累加
  22   1              PulseData=PulseData+1;
  23   1              if(PulseData==16)                          
  24   1              {
  25   2                      SumPulseData[0]=SumPulseData[0]+1;
  26   2                      if(SumPulseData[0]==0x64)
  27   2                      {
  28   3                              SumPulseData[0]=0x00;                   
  29   3                              SumPulseData[1]=SumPulseData[1]+1;
  30   3                              if(SumPulseData[1]==0x64)
  31   3                              {
  32   4                                      SumPulseData[1]=0x00;
  33   4                                      SumPulseData[2]=SumPulseData[2]+1;
  34   4                                      if(SumPulseData[2]==0x64)
  35   4                      {
  36   5                          SumPulseData[2]=0x00;
  37   5                                              SumPulseData[3]=SumPulseData[3]+1;
  38   5                                              if(SumPulseData[3]==0x64)
  39   5                                              {
  40   6                                                      SumPulseData[0]=0x00;
  41   6                                  SumPulseData[1]=0x00;
  42   6                                  SumPulseData[2]=0x00;
  43   6                                  SumPulseData[3]=0x00;
  44   6                                              }
  45   5                      }
  46   4                              }
  47   3                      }
  48   2              }
  49   1          //反向电量累加
  50   1              if(ReverseFgToData)
  51   1              {
  52   2                      if(PulseData==16)
  53   2                      {
  54   3                              ReversePulseData[0]=ReversePulseData[0]+1;
C51 COMPILER V7.10   PULSEPARSE                                                            02/03/2005 10:45:41 PAGE 2   

  55   3                              if(ReversePulseData[0]==0x64)
  56   3                              {
  57   4                                      ReversePulseData[0]=0x00;
  58   4                                      ReversePulseData[1]=ReversePulseData[1]+1;
  59   4                                      if(ReversePulseData[1]==0x64)
  60   4                                      {
  61   5                                              ReversePulseData[1]=0x00;
  62   5                                              ReversePulseData[2]=ReversePulseData[2]+1;
  63   5                                              if(ReversePulseData[2]==0x64)
  64   5                                              {
  65   6                                                      ReversePulseData[2]=0x00;
  66   6                                                      ReversePulseData[3]=ReversePulseData[3]+1;
  67   6                                                      if(ReversePulseData[3]==0x64)
  68   6                                  {                        
  69   7                                                              ReversePulseData[0]=0x00;
  70   7                                          ReversePulseData[1]=0x00;
  71   7                                          ReversePulseData[2]=0x00;
  72   7                                          ReversePulseData[3]=0x00;
  73   7                                  }
  74   6                                              }
  75   5                                      }
  76   4                              }
  77   3                      }
  78   2              }
  79   1          //峰电量累加
  80   1              if(FengFg)
  81   1              {
  82   2              if(PulseData==16)
  83   2              { 
  84   3                      FengPulseData[0]=FengPulseData[0]+1;
  85   3                      if(FengPulseData[0]==0x64)
  86   3                      {
  87   4                              FengPulseData[0]=0x00;
  88   4                              FengPulseData[1]=FengPulseData[1]+1;
  89   4                              if(ReversePulseData[1]==0x64)
  90   4                              {
  91   5                                      FengPulseData[1]=0x00;
  92   5                                      FengPulseData[2]=FengPulseData[2]+1;
  93   5                                      if(ReversePulseData[2]==0x64)
  94   5                                      {
  95   6                                              FengPulseData[2]=0x00;
  96   6                                              FengPulseData[3]=FengPulseData[3]+1;
  97   6                                              if(FengPulseData[3]==0x64)
  98   6                              {
  99   7                                                      FengPulseData[0]=0x00;
 100   7                                      FengPulseData[1]=0x00;
 101   7                                      FengPulseData[2]=0x00;
 102   7                                      FengPulseData[3]=0x00;
 103   7                              }
 104   6                                      }
 105   5                              }
 106   4                      }
 107   3              }
 108   2              }       
 109   1              //平电量累加
 110   1              if(PingFg)
 111   1              {
 112   2              if(PulseData==16)
 113   2              {
 114   3                              PingPulseData[0]=PingPulseData[0]+1;
 115   3                      if(PingPulseData[0]==0x64)
 116   3                      {
C51 COMPILER V7.10   PULSEPARSE                                                            02/03/2005 10:45:41 PAGE 3   

 117   4                              PingPulseData[0]=0x00;
 118   4                              PingPulseData[1]=PingPulseData[1]+1;
 119   4                              if(PingPulseData[1]==0x64)
 120   4                              {
 121   5                                      PingPulseData[1]=0x00;
 122   5                                      PingPulseData[2]=PingPulseData[2]+1;
 123   5                                      if(PingPulseData[2]==0x64)
 124   5                                      {
 125   6                                              PingPulseData[2]=0x00;
 126   6                                              PingPulseData[3]=PingPulseData[3]+1;
 127   6                                              if(PingPulseData[3]==0x64)
 128   6                              {
 129   7                                                      PingPulseData[0]=0x00;
 130   7                                  PingPulseData[1]=0x00;
 131   7                                  PingPulseData[2]=0x00;
 132   7                                  PingPulseData[3]=0x00;
 133   7                              }
 134   6                                      }
 135   5                              }
 136   4                      }
 137   3              }
 138   2              }       
 139   1              //谷电量累加
 140   1              if(GuFg)
 141   1              {
 142   2              if(PulseData==16)
 143   2              {
 144   3                  GuPulseData[0]=GuPulseData[0]+1;
 145   3                      if(GuPulseData[0]==0x64)
 146   3                      {
 147   4                              GuPulseData[0]=0x00;
 148   4                              GuPulseData[1]=GuPulseData[1]+1;
 149   4                              if(GuPulseData[1]==0x64)
 150   4                              {
 151   5                                      GuPulseData[1]=0x00;
 152   5                                      GuPulseData[2]=GuPulseData[2]+1;
 153   5                                      if(GuPulseData[2]==0x64)
 154   5                                      {
 155   6                                              GuPulseData[2]=0x00;
 156   6                                              GuPulseData[3]=GuPulseData[3]+1;
 157   6                                              if(GuPulseData[3]==0x64)
 158   6                              {
 159   7                                                      GuPulseData[0]=0x00;
 160   7                                  GuPulseData[1]=0x00;
 161   7                                  GuPulseData[2]=0x00;
 162   7                                  GuPulseData[3]=0x00;
 163   7                              }
 164   6                                      }
 165   5                              }
 166   4                      }
 167   3               }
 168   2              }
 169   1          if(PulseData==16)
 170   1          {
 171   2              PulseData=0;
 172   2          }
 173   1      }
 174          void PulseParse(void)
 175          {
 176   1              if(PulseParseFg)
 177   1              {
 178   2                      PulseParseFg=0;
C51 COMPILER V7.10   PULSEPARSE                                                            02/03/2005 10:45:41 PAGE 4   

 179   2              Delay(300);
 180   2                      KeyTemp=~P0&0x30;       
 181   2                      switch(KeyTemp) 
 182   2                      {
 183   3                              case 0x00 : //正向电量脉冲采集---累积正向电量                 
 184   3                                                      SumData();                              
 185   3                                                      KBMASK=KBMASK|0x30;
 186   3                                                      EKBI=1;
 187   3                                                      ReverseFgToData=0;
 188   3                                                  ReverseFgToLcd=0;
 189   3                              break;
 190   3                              case 0x01 :     //正向电量脉冲有效标志
 191   3                                                      KBMASK=KBMASK|0x10;
 192   3                                                      EKBI=1;
 193   3                                                      ReverseFgToData=0;
 194   3                                                  ReverseFgToLcd=0;
 195   3                              break;
 196   3                              case 0x02 : //反向电量脉冲标志+脉冲有效---累积标志---反向电量
 197   3                                                      KBMASK=KBMASK|0x20;
 198   3                                                      EKBI=1;
 199   3                                                      ReverseFgToData=1;
 200   3                                                  ReverseFgToLcd=1;
 201   3                              break;
 202   3                              case 0x03 :     
 203   3                                                      SumData();
 204   3                                                      ReverseFgToData=0;
 205   3                                  ReverseFgToLcd=1;
 206   3                              break;  
 207   3                      }
 208   2              }
 209   1      }
 210          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    396    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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