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

📄 display.lst

📁 用TEA7567做的调频收音机,本人经测试通过的
💻 LST
字号:
C51 COMPILER V7.06   DISPLAY                                                               03/16/2009 19:12:49 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE DISPLAY
OBJECT MODULE PLACED IN display.OBJ
COMPILER INVOKED BY: G:\Keil\C51\BIN\C51.EXE display.c OPTIMIZE(9,SIZE) BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          #include "global.h"
   2          #include "display.h"
   3          //**********************显示的开始***************************
   4              //显示函数,先显示万位,最后就是个位,是用共阳数码管的
   5                void Led_Display(void)             
   6                {
   7   1               Wan=1;
   8   1                       Qan=1;
   9   1                       Bai=1;
  10   1                       Shi=1;
  11   1                       Ge=1;  //显示控制口全为高电平时,关显示
  12   1                       switch(Mode)//显示切换
  13   1                       { 
  14   2                        case 0:{
  15   3      //                                      if(Auto_Search_Flag==1)//如果在自动搜频模式下时
  16   3      //                                      {
  17   3      //                                              if(Flag_500ms==1)//计时大于0.5ms了
  18   3      //                                                      LED=0xff;//不显示
  19   3      //                                              else
  20   3      //                                                      LED = Dis_Frequency[Dis_Index];//显示
  21   3      //                                      }
  22   3      //                                      else
  23   3                                                      LED = Dis_Frequency[Dis_Index];
  24   3                                  }
  25   2                                      break;
  26   2                        case 1: LED = Dis_Volume[Dis_Index];    break;
  27   2                        case 2: LED = Dis_Delays[Dis_Index];    break;
  28   2                        case 3: LED = Dis_District[Dis_Index];  break;
  29   2                        case 4: LED = Dis_Node[Dis_Index];      break;
  30   2                        default:   break;
  31   2                       }
  32   1                       
  33   1                       switch(Dis_Index)   //各数码显示控制     
  34   1               {
  35   2      
  36   2                                      case 0: { Wan=0;Qan=1; Bai=1; Shi=1; Ge=1;}  break;
  37   2                              case 1: { Wan=1;Qan=0; Bai=1; Shi=1; Ge=1;}  break;
  38   2                              case 2: { Wan=1;Qan=1; Bai=0; Shi=1; Ge=1;}  break;
  39   2                              case 3: { Wan=1;Qan=1; Bai=1; 
  40   3                                                              if(Auto_Search_Flag==1)//如果在自动搜频模式下时
  41   3                                                              {
  42   4                                                                      if(Flag_500ms==1)//计时大于0.5ms了,不显示后两位
  43   4                                                              {       
  44   5                                                                              Shi=1; Ge=1;
  45   5                                                                      } 
  46   4                                                                      else
  47   4                                                                      {
  48   5                                                                              Shi=0; Ge=1;
  49   5                                                                      }
  50   4                                                              }
  51   3                                                              else
  52   3                                                              {
  53   4                                                                      Shi=0; Ge=1;
  54   4                                                              }
  55   3                                                       }
C51 COMPILER V7.06   DISPLAY                                                               03/16/2009 19:12:49 PAGE 2   

  56   2                                                      break;
  57   2                              case 4: { Wan=1;Qan=1; Bai=1;
  58   3                                                      if(Auto_Search_Flag==1)//如果在自动搜频模式下时
  59   3                                                              {
  60   4                                                                      if(Flag_500ms==1)//计时大于0.5ms了,不显示后两位
  61   4                                                              {       
  62   5                                                                              Shi=1; Ge=1;
  63   5                                                                      } 
  64   4                                                                      else
  65   4                                                                      {
  66   5                                                                              Shi=1; Ge=0;
  67   5                                                                      }
  68   4                                                              }
  69   3                                                              else
  70   3                                                              {
  71   4                                                                      Shi=1; Ge=0;
  72   4                                                              }
  73   3                                                  }
  74   2                                                      break;
  75   2                               
  76   2                                      default:   break;
  77   2                        }
  78   1                       Dis_Index++;         
  79   1                       if(Dis_Index>4)    Dis_Index=0;//回到最高位
  80   1      
  81   1           } 
  82          
  83                   //************************频率值转换函数*********************************************
  84                   void Frequency_Change(unsigned long i)
  85                   {
  86   1                      Frequency_BCD[0]=i/100000;                  //万
  87   1                      Frequency_BCD[1]=i%100000/10000;            //千
  88   1                      Frequency_BCD[2]=i%100000%10000/1000;       //百
  89   1                      Frequency_BCD[3]=i%100000%10000%1000/100;   //十
  90   1                      Frequency_BCD[4]=i%100000%10000%1000%100/10;//个
  91   1                      if(Frequency_BCD[0])
  92   1                              Dis_Frequency[0]=Tab[Frequency_BCD[0]];          //求万位       
  93   1                      else            
  94   1                              Dis_Frequency[0]=0xff;        //关显示万位
  95   1                      Dis_Frequency[1]=Tab[Frequency_BCD[1]];//求个千位
  96   1                      Dis_Frequency[2]=Tab[Frequency_BCD[2]]&0x7f;    //求得百位,加少数点了
  97   1                      Dis_Frequency[3]=Tab[Frequency_BCD[3]];   //得得十位
  98   1      //              Dis_Frequency[4]=0xc0;   //显示0
  99   1                      Dis_Frequency[4]=Tab[Frequency_BCD[4]];   //显示个位
 100   1               }
 101          
 102                   //波段切换时程序
 103                   void Band_Change(unsigned char i)
 104                   {
 105   1                      if(i==0)
 106   1                      {
 107   2                              gdwPresetVCO=Ini_FreqH;//赋值高波段初值
 108   2                              HighestFM=Max_FreqH;
 109   2                              LowestFM=Min_FreqH;
 110   2                      }
 111   1                      else
 112   1                      {
 113   2                              gdwPresetVCO=Ini_FreqL;//赋值高波段初值
 114   2                              HighestFM=Max_FreqL;
 115   2                              LowestFM=Min_FreqL;
 116   2                      }
 117   1                      Mode=0;////显示频率
C51 COMPILER V7.06   DISPLAY                                                               03/16/2009 19:12:49 PAGE 3   

 118   1                      Frequency_Change(gdwPresetVCO);//频率值转换
 119   1                      Tuner_Preset (False,True,Low,gdwPresetVCO);    // Preset to searched station 0301 mao
 120   1               }
 121          
 122               //音量值转换
 123                   void Volume_Change(unsigned char i)
 124                   {
 125   1              //      if(i/10)
 126   1                                Dis_Volume[0]=Tab[i/10];//十位
 127   1              //      else  Dis_Volume[0]=0xff;     //不显示十位
 128   1      
 129   1                  Dis_Volume[1]=Tab[i%10];//个位
 130   1               }
 131          
 132                   //延时值转换
 133                   void Delays_change(unsigned char i)
 134                   {
 135   1                        if(i/100)
 136   1                                      Dis_Delays[0]=Tab[i/100];     //显示百位
 137   1                        else  Dis_Delays[0]=0xff;      //关显示百位
 138   1                        Dis_Delays[1]=Tab[(i%100)/10]; //十位
 139   1                        Dis_Delays[2]=Tab[(i%100)%10]; //个位
 140   1               }
 141                   
 142                   //区位值转换
 143                   void District_Change(unsigned char i)
 144                   {
 145   1                        unsigned char temp;
 146   1                        temp=i%100;
 147   1                        if(i/100)
 148   1                        {
 149   2                              Dis_District[0]=Tab[i/100];      //百位
 150   2                              Dis_District[1]=Tab[temp/10]; //十位
 151   2                              Dis_District[2]=Tab[temp%10]; //个位
 152   2                        }
 153   1                    else      
 154   1                        {
 155   2                              Dis_District[0]=0xff;      //关显示百位
 156   2                              //if(temp/10)
 157   2                                      Dis_District[1]=Tab[temp/10]; //十位
 158   2                              //else  
 159   2                              //      Dis_District[1]=0xff; //关显示十位
 160   2                        }
 161   1                        Dis_District[2]=Tab[temp%10]; //个位
 162   1                }
 163          
 164                    //结点值转换
 165                    void Node_Change(unsigned char i)
 166                    {
 167   1                    unsigned char temp;
 168   1                        temp=i%100;
 169   1                        if(i/100)
 170   1                        {
 171   2                              Dis_Node[0]=Tab[i/100];   //百位
 172   2                              Dis_Node[1]=Tab[temp/10]; //十位
 173   2                              Dis_Node[2]=Tab[temp%10]; //个位
 174   2                        }
 175   1                    else
 176   1                        {
 177   2                              Dis_Node[0]=0xff;         //关显示百位
 178   2                              //if(temp/10)
 179   2                                      Dis_Node[1]=Tab[temp/10]; //十位
C51 COMPILER V7.06   DISPLAY                                                               03/16/2009 19:12:49 PAGE 4   

 180   2                              //else  
 181   2                              //      Dis_Node[1]=0xff;       //关显示十位
 182   2                              Dis_Node[2]=Tab[temp%10];     //个位
 183   2                         }
 184   1                }
 185          
 186                    void Ini_Data(void)
 187                {
 188   1                //***************               
 189   1                        VolSet(0);    
 190   1                        Frequency_Change(gdwPresetVCO);
 191   1                        WatchDog;//喂狗
 192   1                        Volume_Change(Volume);
 193   1                        Dis_Volume[2]=0xff;         //关
 194   1                        Dis_Volume[3]=0xa1;         //d
 195   1                        Dis_Volume[4]=0x83;         //b
 196   1      
 197   1                        Delays_change(Delay_s);
 198   1                        Dis_Delays[3]=0xff;         //关
 199   1                        Dis_Delays[4]=0x92;         //S
 200   1      
 201   1                    District_Change(District);
 202   1                        Dis_District[3]=0xc6;       //C
 203   1                        Dis_District[4]=0x89;       //H
 204   1      
 205   1                        Node_Change(Node);
 206   1                        Dis_Node[3]=0xab;           //n
 207   1                        Dis_Node[4]=0xa1;           //d
 208   1      
 209   1                        Start_Process();
 210   1      
 211   1                        
 212   1      
 213   1                        WatchDog;//喂狗                 
 214   1                         
 215   1            }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    683    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =     60       4
   IDATA SIZE       =   ----    ----
   BIT SIZE         =      2    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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