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

📄 main.lst

📁 可以对UC1697V的进行连续烧录
💻 LST
字号:
C51 COMPILER V8.02   MAIN                                                                  07/28/2008 17:49:19 PAGE 1   


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

line level    source

   1          //===================================================================
   2          //                             CSTN
   3          //                                        LCD:  Varitronix
   4          //                                       DUTY:  1/128   BIAS:  1/12  VOP: 15.3 (V)                                
   5          //                     IC:  Ultrachip UC1697a or Stronix ST7637             
   6          //                Parallel   8080 8bit   128*128             
   7          //===================================================================
   8          //===================================================================
   9          //                                               Writer:        Jim
  10          //                                                 Date:        07/25/2008
  11          //                                          Version:    V1.0    
  12          //===================================================================
  13          //===================================================================
  14          // History:                  
  15          //===================================================================
  16          
  17          #include "Main.H"
*** ERROR C141 IN LINE 12 OF C:\KEIL\C51\INC\INTRINS.H: syntax error near 'extern', expected ';'
  18          #include "Port.H"
  19          #include "Time_Mode.H"
  20          #include "Pattern_Show.H"
  21          
  22          extern tByte ael_main;
  23          
  24          void main()
  25          {
  26   1      
  27   1      tByte i;
  28   1      
  29   1              Reset_LCD();
  30   1              Initial_IO();
  31   1              Initial_Main();
  32   1              while(1)
  33   1              {
  34   2      
  35   2                      Pitcure_Pattern_Main_Show();
  36   2                      Press();
  37   2      
  38   2                      RGB_Pattern_Show();
  39   2                      Press();
  40   2                
  41   2                  Lcd_DspAscII8X16(2,0,0x07e0,"MXMY OTP SUCESS!");
  42   2                      Lcd_DspAscII8X16(8,54,0xf800,"  Ultrachip ");
  43   2                      Lcd_DspAscII8X16(10,80,0x001f,"  UC1697a  ");
  44   2                      Press();
  45   2      
  46   2                      Number_Pattern_Main_Show();
  47   2                      Press();
  48   2      
  49   2                  ColorBAR_Pattern_Main_Show();
  50   2                      Press();
  51   2      
  52   2                      Gray_Pattern_Main_Show();
  53   2                      Press();
  54   2      
C51 COMPILER V8.02   MAIN                                                                  07/28/2008 17:49:19 PAGE 2   

  55   2                      Other_Pattern_Show();
  56   2                      Press();
  57   2                 /*
  58   2                for(i=1;i<16;i++)
  59   2                {
  60   2                      display_eprom(i);
  61   2                      Press();
  62   2                      
  63   2                      }  */
  64   2              }
  65   1      }
  66          
  67          void Window_Main()
  68          {
  69   1      
  70   1       #if 1
  71   1      
  72   1              WriteCOM_Main(0x00);                    // Column Address Set
  73   1              WriteCOM_Main(0x10);
  74   1      
  75   1      
  76   1              WriteCOM_Main(0x60);                    // Row Address Set
  77   1              WriteCOM_Main(0x70);
  78   1      
  79   1              WriteCOM_Main(0xf4);
  80   1          WriteCOM_Main(0);                  //y
  81   1      
  82   1          WriteCOM_Main(0xf5);                                                //Row start        x
  83   1          WriteCOM_Main(0);                                   //col start
  84   1      
  85   1          WriteCOM_Main(0xf6);
  86   1          WriteCOM_Main(0x7f);
  87   1      
  88   1          WriteCOM_Main(0xf7);                                                //Row End
  89   1          WriteCOM_Main(0x7f);
  90   1      
  91   1      #endif
  92   1      
  93   1       #if 0
              
                      WriteCOM_Main(0x2a);                    // Column Address Set
                      WriteDAT_Main(0x01);
                      WriteDAT_Main(0x82);
              
                      WriteCOM_Main(0x2b);                    // Row Address Set
                      WriteDAT_Main(0x01);
                      WriteDAT_Main(0x82);
              
                      WriteCOM_Main(0x2c);
              #endif
 105   1      
 106   1      #if 0
              
                      WriteCOM_Main(0x2a);                    // Column Address Set
                      WriteDAT_Main(0x02);
                      WriteDAT_Main(0x81);
              
                      WriteCOM_Main(0x2b);                    // Row Address Set
                      WriteDAT_Main(0x00);
                      WriteDAT_Main(0x7f);
              
                      WriteCOM_Main(0x2c);
C51 COMPILER V8.02   MAIN                                                                  07/28/2008 17:49:19 PAGE 3   

              
              #endif
 119   1      
 120   1      }
 121          
 122          void Initial_IO()
 123          {
 124   1              P0=0xff;
 125   1              P1=0xff;
 126   1              P2=0xff;
 127   1              P3=0xff;
 128   1      }
 129          
 130          void Reset_LCD()
 131          {
 132   1              _CS_MAIN=0;
 133   1              _RES=1;
 134   1              Delay(20);
 135   1              _RES=0;
 136   1              Delay(20);
 137   1              _RES=1;
 138   1              Delay(200);
 139   1              _CS_MAIN=1;
 140   1      }
 141          
 142          void Delay(tByte count)   /* Delay 1ms */
 143          {
 144   1              tByte i,j;
 145   1              for(i=0;i<count;i++)
 146   1                      for(j=0;j<120;j++)
 147   1                      ;
 148   1      }
 149          
 150          void Press() 
 151          {
 152   1              tByte key;
 153   1              tByte com,databus;
 154   1      //      tByte i==0,j==0;
 155   1      
 156   1      while(STEPB==1)
 157   1              {
 158   2              
 159   2                key=0;
 160   2                Delay(10);
 161   2      
 162   2      if(add==0)
 163   2                      {
 164   3                         if(add==0)
 165   3      
 166   3                            {
 167   4                                  while(!add)
 168   4                                  {}
 169   4      //                              i++;
 170   4                                      ael_main++;
 171   4                                      key=1;
 172   4                      com=0x81;        //command code //
 173   4                      databus=ael_main;
 174   4                                      
 175   4                                        }
 176   3                              }
 177   2      else if(sub==0)
 178   2                              {     
C51 COMPILER V8.02   MAIN                                                                  07/28/2008 17:49:19 PAGE 4   

 179   3                                 if(sub==0)
 180   3      
 181   3                            {
 182   4                                  while(!sub)
 183   4                                  {}          
 184   4      //                              j--;
 185   4                                      ael_main--;     
 186   4                                      key=1;
 187   4                                      com=0x81;
 188   4                                      databus=ael_main;
 189   4                                       
 190   4                                  }
 191   3                                
 192   3                                }
 193   2                              if (key==1)
 194   2                              {
 195   3      /*                         
 196   3          if((i>=32)||(j<=-33))
 197   3          {
 198   3            i = 0;
 199   3            Contrast_Register = Setting;
 200   3            Delay(200);
 201   3            Gray_scale();
 202   3          }
 203   3          else
 204   3          {
 205   3            Contrast_Register = Setting + i;
 206   3            write_command(0x2a);                //Contrast Control 1
 207   3            write_command(Contrast_Register);   //
 208   3          }
 209   3                      */
 210   3                                      WriteCOM_Main(com);
 211   3                                      WriteCOM_Main(databus); 
 212   3                                      key=0;
 213   3                              } 
 214   2      
 215   2               }
 216   1              if(STEPB==0)
 217   1            {    
 218   2                while(STEPB==0)
 219   2                {
 220   3                    Delay(4);
 221   3                }
 222   2                Delay(5);              
 223   2            }
 224   1               
 225   1          Delay(5);             
 226   1        }
 227                                                     
 228          
 229          
 230          

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

⌨️ 快捷键说明

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