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

📄 main.lst

📁 完整的LM240128的显示程序,可以通过修改程序中的变量来改变显示内容,P89C668环境,其他51内核单片机均可移植,也可以加入控制程序在不同的情况下显示不同的内容.经过调试可用.
💻 LST
📖 第 1 页 / 共 4 页
字号:
  54          *****************************************************************************/    
  55          void RefreshChain(uint x)
  56          {       
  57   1              Bi_Chain=1;Bi_Frequency=~Bi_Chain;
  58   1              Uc_Status2=2;
  59   1              hextobcd(x);
  60   1              dprintf(6,2,k);
  61   1      
  62   1              Uc_Status2=1;
  63   1              hextobcd(x*2);
  64   1              dprintf(6,1,k);
  65   1              Bi_Chain=1;Bi_Frequency=~Bi_Chain;
  66   1              Uc_Status2=2;
  67   1      }
  68          /****************************************************************************                             
             -                                                                                                                        
             -                                                                                                  
  69          Function:RefreshPwrdBm                                                                                    
             -                                                                                                                        
             -                                                                                 
  70          Parameter:None                                                                                            
             -                                                                                                                        
             -                                                                          
  71          Retrun:None                                                                                               
             -                                                                                                                        
             -                                                                       
  72          Description:显示dBm功率                                                                                   
             -                                                                                                                        
             -                                                                                 
  73          *****************************************************************************/    
  74          void RefreshPwrdBm(int x)
  75          {       
  76   1              uint y;
  77   1              Bi_PwrdBm=1;Bi_PwrmW=~Bi_PwrdBm;
  78   1              Uc_Status2=3;
  79   1              int_hextobcd(x);
  80   1              dprintf(6,3,k);
  81   1              Bi_PwrdBm=1;Bi_PwrmW=~Bi_PwrdBm;
  82   1              /*计算mW*/
  83   1              Uc_Status2=4;
  84   1              y=dBmTomW(x);
  85   1              hextobcd(y);
  86   1              dprintf(6,4,k);
  87   1              Uc_Status2=3;
  88   1      }
  89          /****************************************************************************                             
             -                                                                                                                        
             -                                                                                                  
  90          Function:RefreshPwrmW                                                                                     
             -                                                                                                                        
             -                                                                                
  91          Parameter:None                                                                                            
             -                                                                                                                        
             -                                                                          
C51 COMPILER V7.50   MAIN                                                                  09/07/2006 10:33:09 PAGE 9   

  92          Retrun:None                                                                                               
             -                                                                                                                        
             -                                                                       
  93          Description:显示mW功率                                                                                    
             -                                                                                                                        
             -                                                                                
  94          *****************************************************************************/    
  95          void RefreshPwrmW(uint x)
  96          {       
  97   1              Bi_PwrmW=1;Bi_PwrdBm=~Bi_PwrmW;
  98   1              Uc_Status2=4;
  99   1              hextobcd(x);
 100   1              dprintf(6,4,k);
 101   1              Bi_PwrdBm=1;Bi_PwrmW=~Bi_PwrdBm;
 102   1              Uc_Status2=3;
 103   1              hextobcd(x);
 104   1              dprintf(6,3,k);
 105   1              Uc_Status2=4;
 106   1      }
 107          /****************************************************************************                             
             -                                                                                                                        
             -                                                                                                  
 108          Function:RefreshSC                                                                                        
             -                                                                                                                        
             -                                                                             
 109          Parameter:None                                                                                            
             -                                                                                                                        
             -                                                                          
 110          Retrun:None                                                                                               
             -                                                                                                                        
             -                                                                       
 111          Description:显示SC                                                                                        
             -                                                                                                                        
             -                                                                            
 112          *****************************************************************************/    
 113          void RefreshSC(uint x)
 114          {       
 115   1              Bi_SC=1;
 116   1              Uc_Status2=5;
 117   1              hextobcd(x);
 118   1              dprintf(6,5,k);
 119   1      }
 120          
 121          /****************************************************************************                             
             -                                                                                                                        
             -                                                                                                  
 122          Function:RefreshActual Pwr                                                                                
             -                                                                                                                        
             -                                                                                     
 123          Parameter:None                                                                                            
             -                                                                                                                        
             -                                                                          
 124          Retrun:None                                                                                               
             -                                                                                                                        
             -                                                                       
 125          Description:显示RefreshActual Pwr                                                                         
             -                                                                                                                        
             -                                                                                          
 126          *****************************************************************************/    
 127          void RefreshActualPwr(uint x)
 128          {       
 129   1              Uc_Status2=6;
C51 COMPILER V7.50   MAIN                                                                  09/07/2006 10:33:09 PAGE 10  

 130   1              hextobcd(x);
 131   1              dprintf(12,6,k);
 132   1      }
 133          /****************************************************************************                             
             -                                                                                                                        
             -                                                                                                  
 134          Function:Init240128                                                                                       
             -                                                                                                                        
             -                                                                              
 135          Parameter:None                                                                                            
             -                                                                                                                        
             -                                                                          
 136          Retrun:None                                                                                               
             -                                                                                                                        
             -                                                                       
 137          Description:初始化240128,并显示最新数据                                                                  
             -                                                                                                                        
             -                                                                                                   
 138          *****************************************************************************/         
 139          void Init240128(void)
 140          {
 141   1              shortdelay(1200);
 142   1              RESET=0;
 143   1              shortdelay(200);
 144   1              RESET=1;
 145   1              fnLCMInit();
 146   1              cls();
 147   1              cursor(0,0);
 148   1              dispalylogo();
 149   1                      shortdelay(1200);
 150   1                      shortdelay(1200);
 151   1                      shortdelay(1200);
 152   1                      shortdelay(1200);
 153   1                      shortdelay(1200);
 154   1                      shortdelay(1200);
 155   1                      shortdelay(1200);
 156   1                      shortdelay(1200);
 157   1                      shortdelay(1200);
 158   1                      shortdelay(1200);
 159   1                      shortdelay(1200);
 160   1                      shortdelay(1200);
 161   1                      shortdelay(1200);
 162   1                      shortdelay(1200);
 163   1                      shortdelay(1200);
 164   1                      shortdelay(1200);
 165   1                      shortdelay(1200);
 166   1                      shortdelay(1200);
 167   1                      shortdelay(1200);
 168   1                      shortdelay(1200);
 169   1                      shortdelay(1200);
 170   1                      shortdelay(1200);
 171   1                      shortdelay(1200);
 172   1                      shortdelay(1200);
 173   1                      shortdelay(1200);
 174   1                      shortdelay(1200);
 175   1                      shortdelay(1200);
 176   1                      shortdelay(1200);
 177   1                      shortdelay(1200);
 178   1                      shortdelay(1200);
 179   1                      shortdelay(1200);
 180   1                      shortdelay(1200);
 181   1      
C51 COMPILER V7.50   MAIN                                                                  09/07/2006 10:33:09 PAGE 11  

 182   1              cls();
 183   1              dprintf(1,0,"Mode:");
 184   1              dprintf(1,1,"Freq:");
 185   1              dprintf(13,1,"(MHz)");
 186   1              dprintf(1,2,"Chan:");
 187   1              dprintf(1,3,"Pwr :");
 188   1              dprintf(13,3,"(dBm)");
 189   1              dprintf(13,4,"(mW)");
 190   1              dprintf(1,5,"SC  :");
 191   1              dprintf(1,6,"Actual Pwr:");
 192   1              dprintf(18,6,"(dBm)");
 193   1              dprintf(1,7,"中国");
 194   1              /*显示模式*/
 195   1              if(Bi_Mode==1)
 196   1                      {
 197   2                              dprintf(7,0,CW);
 198   2                      }       
 199   1              else
 200   1                      {
 201   2                              dprintf(7,0,Pilot);
 202   2                      }
 203   1              /*显示频率*/
 204   1              Uc_Status2=1;   
 205   1              hextobcd(Ui_Freq);
 206   1              dprintf(6,1,k);
 207   1              /*SC*/
 208   1              Uc_Status2=2;
 209   1              Ui_Chan=Ui_Freq/2;
 210   1              hextobcd(Ui_Chan);
 211   1              dprintf(6,2,k);
 212   1      
 213   1              /*显示功率dBm*/
 214   1              Uc_Status2=3;   
 215   1              int_hextobcd(I_PwrdBm);
 216   1              dprintf(6,3,k);
 217   1              /*显示功率mW*/
 218   1              Uc_Status2=4;
 219   1              Ui_PwrmW=dBmTomW(I_PwrdBm);
 220   1              hextobcd(Ui_PwrmW);
 221   1              dprintf(6,4,k);
 222   1              /*显示SC*/
 223   1              Uc_Status2=5;   
 224   1              hextobcd(Ui_Sc);
 225   1              dprintf(6,5,k);
 226   1      }

⌨️ 快捷键说明

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