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

📄 s6b33b0a.lst

📁 SAMSUNG S6B33B0程序
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V7.07   S6B33B0A                                                              09/10/2005 11:32:45 PAGE 1   


C51 COMPILER V7.07, COMPILATION OF MODULE S6B33B0A
OBJECT MODULE PLACED IN S6B33B0A.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE S6B33B0A.c BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          #include  "define.h"
   2          #include  "cpu8052.h"
   3          #include  "global.h"
   4          #include  "delay.h"
   5          #include  "S6B33B0A.h"
   6          
   7          
   8          // Initialize routine for S6B33B0 
   9          #define OSCILLATION_MODE_SET 0x02 
  10          #define DRIVER_OUTPUT_MODE_SET 0x10 
  11          #define DC_DC_SET 0x20 
  12          #define CURRENT_BIAS_SET 0x22 
  13          #define PCK_GENER_MODE_SET 0x24 // = DCDC Clock division set 
  14          #define DCDC_AMP_ON_OFF_SET 0x26 
  15          #define TEMP_COMPENSATION_SET 0x28 
  16          #define CONTRAST_CONTROL1 0x2A 
  17          #define CONTRAST_CONTROL2 0x2B 
  18          #define STANDBY_MODE_OFF 0x2C 
  19          #define STANDBY_MODE_ON 0x2D 
  20          #define DDRAM_BURST_MODE_OFF 0x2E 
  21          #define DDRAM_BURST_MODE_ON 0x2F 
  22          #define ADDRESSING_MODE_SET 0x30 
  23          #define ROW_VECTOR_MODE_SET 0x32 
  24          #define N_LINE_INVERSION_SET 0x34 // = N-Block Inversion 
  25          #define ENTRY_MODE_SET 0x40 
  26          #define X_ADDRESS_AREA_SET 0x42 
  27          #define Y_ADDRESS_AREA_SET 0x43 
  28          #define RAM_SKIP_AREA_SET 0x45 
  29          #define DISPLAY_OFF 0x50 
  30          #define DISPLAY_ON 0x51 
  31          #define SPEC_DISPLAY_PATTERN_SET 0x53 
  32          #define PARTIAL_DISPLAY_MODE_SET 0x55 
  33          #define PARTIAL_DISPLAY_START_LINE_SET 0x56 
  34          #define PARTIAL_DISPLAY_END_LINE_SET 0x57 
  35          #define AREA_SCROLL_MODE_SET 0x59 
  36          #define SCROLL_START_LINE_SET 0x5A 
  37          #define SET_DISPLAY_DATA_LENGTH 0xFC 
  38          #define HS_LCD_INDEX_REG         0
  39          #define HS_LCD_DATA              1
  40          
  41          void Initalize(Byte M_Contrast) 
  42          {
  43   1      
  44   1      // Standby mode off 
  45   1       outpw(STANDBY_MODE_OFF); 
  46   1      // Select internal or external OSC clock and OSC On/Off control 
  47   1      
  48   1      outpw(OSCILLATION_MODE_SET); 
  49   1       outpw(0x01); // Use internal OSC and OSC On 
  50   1      // Select the first booster抯 boosting step for V1 generation 
  51   1      
  52   1      outpw(DC_DC_SET); 
  53   1      outpw(0x05); // X1.5 step for normal mode(with partial mode 0) and partial mode 1 
  54   1      // Control the 1st booster, V1 AMP, 2nd booster and 3rd booster 
  55   1      
C51 COMPILER V7.07   S6B33B0A                                                              09/10/2005 11:32:45 PAGE 2   

  56   1      outpw(DCDC_AMP_ON_OFF_SET); 
  57   1      outpw(0x01); // 1st booster On 
  58   1      DelayX1ms1(30); // Waiting 30mS for 1st booster output stabilization 
  59   1      
  60   1      outpw(DCDC_AMP_ON_OFF_SET); 
  61   1      outpw(0x09); // 1st Booster and V1 AMP On 
  62   1      DelayX1ms1(30); // Waiting 30mS for V1 AMP output stabilization 
  63   1      
  64   1      outpw(DCDC_AMP_ON_OFF_SET); 
  65   1      outpw(0x0B); // 1st booster, V1 AMP and 2nd booster On 
  66   1      DelayX1ms1(30); // Waiting 30mS for 2nd booster output stabilization 
  67   1      
  68   1      outpw(DCDC_AMP_ON_OFF_SET); 
  69   1      outpw(0x0F); // 1st booster, V1 AMP, 2nd booster and 3rd booster On 
  70   1      DelayX1ms1(30); // Waiting 30mS for 3rd booster output stabilization 
  71   1      
  72   1      // Set the temperature compensation ratio 
  73   1      outpw(TEMP_COMPENSATION_SET); 
  74   1      outpw(0x00); // 0.00 % 
  75   1       
  76   1      // Burst mode off for data RAM write 
  77   1      outpw(DDRAM_BURST_MODE_OFF); 
  78   1      // when burst mode on, data RAM write data length change to 32bit regardless MPU interface setting. 
  79   1      
  80   1      // RAM address skip area setting 
  81   1      outpw(RAM_SKIP_AREA_SET); 
  82   1      outpw(0x00); // Set to No skip 
  83   1      
  84   1      // Specified display pattern select 
  85   1      outpw(SPEC_DISPLAY_PATTERN_SET); 
  86   1      outpw(0x00); // Normal display. 
  87   1      // outpw(HS_LCD_INDEX_REG, 0x01); // Reverse display. 
  88   1      // outpw(HS_LCD_INDEX_REG, 0x02); // All display off 
  89   1      // outpw(HS_LCD_INDEX_REG, 0x03); // All display on 
  90   1      // Select number of display line, Segment direction and Red/Blue output swap 
  91   1      
  92   1      outpw(DRIVER_OUTPUT_MODE_SET); 
  93   1      outpw(0x22); // 1/160 duty and Red/Blue output swap 
  94   1      // DCDC Clock division set 
  95   1      
  96   1      outpw(PCK_GENER_MODE_SET); 
  97   1      outpw(0x33); // fosc/8 division for normal(with partial mode 0) and partial mode 1 
  98   1      //outpw(0x22); 
  99   1      
 100   1      // Addressing mode set 
 101   1      outpw(ADDRESSING_MODE_SET); 
 102   1      outpw(0x1B); 
 103   1      // 65K color mode, Dummy sub group off, sub group frame inversion on, sub group inversion off and sub grou
             -p phase 
 104   1      // change every 2 pixel unit. 
 105   1      
 106   1      // Row vector mode set 
 107   1      outpw(ROW_VECTOR_MODE_SET); 
 108   1      outpw(0x0E); // Increment type = Y, Vector type = Diagonal 
 109   1      
 110   1      // Entry mode set 
 111   1      outpw(ENTRY_MODE_SET); 
 112   1      outpw(0x01); // Non-Reverse, Y-direction prefer, Read modify off 
 113   1      // Y-address area set(for segment direction) 
 114   1       
 115   1         Lcd_Window(0,127,0,159);
 116   1         Set_NLine(13);
C51 COMPILER V7.07   S6B33B0A                                                              09/10/2005 11:32:45 PAGE 3   

 117   1         Set_Contrast(M_Contrast);
 118   1      
 119   1      // Driving current and bias set 
 120   1      outpw(CURRENT_BIAS_SET); 
 121   1      outpw(0x11); // Normal current driving mode and 1/5 bias for all display mode 
 122   1      //outpw(0x22); 
 123   1      // Partial display mode set 
 124   1      outpw(PARTIAL_DISPLAY_MODE_SET); 
 125   1      outpw(0x00); // Partial display mode off 
 126   1      
 127   1      // Display start line set for all partial display mode 
 128   1      outpw(PARTIAL_DISPLAY_START_LINE_SET); 
 129   1      outpw(0x00); 
 130   1      
 131   1      // Display end line set for all partial display mode 
 132   1      outpw(PARTIAL_DISPLAY_END_LINE_SET); 
 133   1      outpw(0x9F); 
 134   1      
 135   1      // Area scroll set 
 136   1      //outpw(AREA_SCROLL_MODE_SET); 
 137   1      //outpw(0x00); // Area scroll mode off(Entire display) 
 138   1      //outpw(0x00); // Scroll area start line 
 139   1      //outpw(0x9F); // Scroll area end line 
 140   1      //outpw(0x00); // Lower fixed number 
 141   1      
 142   1      // Scroll start line set when use area scroll set 
 143   1      // outpw(HS_LCD_INDEX_REG, SCROLL_S TART_LINE_SET); 
 144   1      // outpw(0x00); 
 145   1      
 146   1      // Write initial display data 
 147   1      // outpw(HS_LCD_CTRL_REG, lcd_init_image[128*i+j]); 
 148   1      
 149   1      // Display On 
 150   1      outpw(DISPLAY_ON); 
 151   1      
 152   1      }
 153          
 154          void Main_Off(void)     
 155          {
 156   1      
 157   1      outpw(DISPLAY_OFF); 
 158   1      
 159   1      outpw(STANDBY_MODE_ON); 
 160   1      
 161   1      DelayX1ms1(200); 
 162   1      
 163   1      }
 164          
 165          
 166          void outpw(unsigned char Value_Lo)
 167          {
 168   1         char  xdata *ptr ;
 169   1          
 170   1          CS2   = 1;
 171   1          CS1   = 0;
 172   1              RS    = 0;
 173   1          ptr = Value_Lo;
 174   1         *ptr=Value_Lo;
 175   1       
 176   1      }
 177          
 178          
C51 COMPILER V7.07   S6B33B0A                                                              09/10/2005 11:32:45 PAGE 4   

 179          
 180          void Lcd_Window(unsigned char X1,unsigned char X2,unsigned char Y1,unsigned char Y2)
 181          {
 182   1         
 183   1       
 184   1      outpw(0x43); 
 185   1      outpw(X1); // from 0 
 186   1      outpw(X2); // to 127 for 128 segment 
 187   1      // X-address area set(for common direction) 
 188   1      outpw(0x42); 
 189   1      outpw(Y1); // from 0 
 190   1      outpw(Y2); // to 159 for 160 common 
 191   1      
 192   1      }
 193          
 194          
 195          
 196          
 197          void Set_NLine(unsigned char N_LINE)
 198          {
 199   1      
 200   1        // N-line inversion set 
 201   1      outpw(N_LINE_INVERSION_SET); 
 202   1      outpw(N_LINE); // FIM=off, FIP=off, N-BLK=13  
 203   1      
 204   1      
 205   1      }
 206          
 207          
 208          
 209          
 210          void Set_Contrast(unsigned char Contrast)
 211          {
 212   1      // Contrast control for partial display mode 1 
 213   1      //outpw(CONTRAST_CONTROL2); 
 214   1      //outpw(0x20); // Can be change for suitable contrast 
 215   1      // Contrast control for normal display and partial display mode 0 
 216   1      
 217   1      outpw(CONTRAST_CONTROL1); 
 218   1      //outpw(0xBF); // Can be change for suitable contrast 
 219   1      outpw(Contrast); 
 220   1      
 221   1      }
 222          
 223          
 224          unsigned char xdata address _at_ 0x0000;
 225          
 226          
 227          
 228          void Picture(int Page)
 229          {
 230   1       
 231   1         Word i,j;    
 232   1      
 233   1        unsigned char xdata *index=&address;           
 234   1        char Value_Hi;   
 235   1        char Value_Lo; 
 236   1        // unsigned long  X_Addr;
 237   1       //  unsigned char  H_Addr;
 238   1        
 239   1       
 240   1      
C51 COMPILER V7.07   S6B33B0A                                                              09/10/2005 11:32:45 PAGE 5   

 241   1        Lcd_Window(0,127,0,159);
 242   1        
 243   1        switch(Page)
 244   1        {
 245   2         case(0) :
 246   2          P1_0 = 0; 
 247   2          P1_1 = 0;      
 248   2          P1_2 = 0;
 249   2         index=0;
 250   2         break;
 251   2         
 252   2         case(1) :
 253   2          P1_0 = 0; 
 254   2          P1_1 = 0;      
 255   2          P1_2 = 0;
 256   2         index=0xa000;
 257   2         break ;
 258   2         
 259   2         case(2) :
 260   2          P1_0 = 1; 
 261   2          P1_1 = 0;      
 262   2          P1_2 = 0;
 263   2         index=0x4000;
 264   2         break;
 265   2        
 266   2         case(3) :
 267   2          P1_0 = 1; 
 268   2          P1_1 = 0;      
 269   2          P1_2 = 0;
 270   2         index=0xe000;
 271   2         break;
 272   2      
 273   2         case(4) :
 274   2          P1_0 = 0; 
 275   2          P1_1 = 1;      
 276   2          P1_2 = 0;
 277   2         index=0x8000;
 278   2         break;
 279   2      
 280   2         case(5) :
 281   2          P1_0 = 1; 
 282   2          P1_1 = 1;      
 283   2          P1_2 = 0;
 284   2         index=0x2000;
 285   2         break;
 286   2      
 287   2         case(6) :
 288   2          P1_0 = 1; 
 289   2          P1_1 = 1;      
 290   2          P1_2 = 0;
 291   2         index=0xc000;
 292   2         break;
 293   2        
 294   2         case(7) :
 295   2          P1_0 = 0; 
 296   2          P1_1 = 0;      
 297   2          P1_2 = 1;
 298   2         index=0x6000;
 299   2         break;
 300   2         
 301   2         case(8) :
 302   2          P1_0 = 1; 
C51 COMPILER V7.07   S6B33B0A                                                              09/10/2005 11:32:45 PAGE 6   

 303   2          P1_1 = 0;      
 304   2          P1_2 = 1;
 305   2         index=0;
 306   2         break;
 307   2         
 308   2         case(9) : 
 309   2          P1_0 = 1; 
 310   2          P1_1 = 0;      
 311   2          P1_2 = 1;
 312   2      
 313   2         index=0xa000;
 314   2         break ;
 315   2         

⌨️ 快捷键说明

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