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

📄 measure_f.lst

📁 一种多功能频率计
💻 LST
字号:
C51 COMPILER V8.08   MEASURE_F                                                             09/23/2008 07:30:53 PAGE 1   


C51 COMPILER V8.08, COMPILATION OF MODULE MEASURE_F
OBJECT MODULE PLACED IN measure_F.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE measure_F.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include<reg52.h>
   2          #include<lcd1602.h>
   3          #include<counter.h>
   4          #include<measure_F.h>
   5          #include<write164.h>
   6          #include <delay.h>
   7          
   8          void measure_F()
   9          {   
  10   1          uchar dotwei;
  11   1          uchar Mflag;
  12   1          unsigned long  freq;
  13   1              gotoxy(2,1);
  14   1          write_LCD_data('=');
  15   1              dotwei=0;
  16   1      
  17   1      while(1)
  18   1      {
  19   2              Mflag=1;
  20   2         write164(Fen200_MF); /*选通200分频,测200k--10M的信号*/
  21   2              while(Mflag)
  22   2              {  
  23   3                  freq=counter(1);
  24   3                      if(freq>50000)
  25   3                      {
  26   4                      gotoxy(2,3);
  27   4                      write_LCD_data('E');
  28   4                      }
  29   3              
  30   3             else if((freq<=50000)&&(freq>1000))      
  31   3                    { freq=freq*200;
  32   4                          gotoxy(2,3);
  33   4                 display_LCD_number(freq,dotwei);
  34   4                         }
  35   3            else Mflag=0;
  36   3                if(freq==0) {goto reti;}
  37   3         }
  38   2      
  39   2              Mflag=1;
  40   2          write164(Fen100_MF);/*选通100分频,测10k--200k的信号*/
  41   2         while(Mflag)
  42   2               {   
  43   3               freq=counter(1);
  44   3               if((freq>1000)&&(freq<=2000))  
  45   3                   { freq=freq*100;
  46   4                         gotoxy(2,3);
  47   4                 display_LCD_number(freq,dotwei);
  48   4                       }
  49   3           else 
  50   3                   {if((freq<=1000)&&(freq>100))
  51   4                        {
  52   5                                 freq=counter(5);
  53   5                                 freq=freq*20;
  54   5                     gotoxy(2,3);
  55   5                    display_LCD_number(freq,dotwei);
C51 COMPILER V8.08   MEASURE_F                                                             09/23/2008 07:30:53 PAGE 2   

  56   5                                }
  57   4                else  Mflag=0;
  58   4                   }
  59   3          if(freq==0) {goto reti;}
  60   3          }
  61   2      
  62   2         
  63   2            Mflag=1;
  64   2            write164(Direct_MF);/*选通直通分频,测500--10k的信号*/
  65   2                while(Mflag)
  66   2              {
  67   3             freq=counter(2);
  68   3                 if(freq>1000)
  69   3                 { freq=freq*5;
  70   4                 dotwei=1;
  71   4                 gotoxy(2,3);
  72   4                 display_LCD_number(freq,dotwei);
  73   4                 }
  74   3              else Mflag=0;
  75   3       if(freq==0) {goto reti;}
  76   3              }
  77   2              
  78   2              Mflag=1;                        
  79   2              write164(Direct_MF); /*选通直通分频,测1--500的信号*/
  80   2          while(Mflag)
  81   2        {
  82   3               freq=counter(10);
  83   3      
  84   3           if(freq>=10)
  85   3               {
  86   4             dotwei=1;
  87   4            gotoxy(2,3);
  88   4               display_LCD_number(freq,dotwei);
  89   4               }     
  90   3               else
  91   3               {
  92   4                freq=counter(100);
  93   4                if(freq>100)
  94   4                { dotwei=2;
  95   5                 gotoxy(2,3);
  96   5                  display_LCD_number(freq,dotwei);    ///freq=freq/10;/*想办法显示小数部分*/
  97   5               }
  98   4               else Mflag=0;
  99   4                }
 100   3         if(freq==0) {goto reti;}
 101   3        }
 102   2      
 103   2       /*   Mflag=1;
 104   2      //      write164(Direct_MF);
 105   2              while(Mflag)
 106   2        {P1=0x00;
 107   2          delay(1);
 108   2              P1=0xff;
 109   2              freq=counter(1);
 110   2              if(freq>0)
 111   2         {dotwei=3;           
 112   2              gotoxy(2,3);
 113   2              
 114   2              display_LCD_number(freq,dotwei);
 115   2              }
 116   2         else Mflag=0;
 117   2         if(freq==0) {goto reti;}
C51 COMPILER V8.08   MEASURE_F                                                             09/23/2008 07:30:53 PAGE 3   

 118   2        }*/
 119   2       
 120   2      }
 121   1         reti:;
 122   1      }
 123          
 124          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    663    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----       6
   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 + -