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

📄 main.lst

📁 pt24018_lcd控制器在linux-2.4.19下的驱动程序
💻 LST
字号:
C51 COMPILER V8.02   MAIN                                                                  01/18/2007 14:09:34 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 DEBUG OBJECTEXTEND

line level    source

   1          /*********************************************************
   2          YMC240128-13AAAFRGL
   3          IC:ST7529
   4          Vlcm=3.0v,Vlcd=V0-Vss=13.5v,1/128duty,1/12bias,2x~8x
   5          测板:6800,7x
   6          *********************************************************/
   7          
   8          #include <reg52.h>
   9          #include <intrins.h>
  10          #include "delay.h"
  11          //#include "isp.h"
  12          
  13          sbit    res     =       P2^3;
  14          sbit    cs      =       P2^4;
  15          sbit    rs      =       P2^0;
  16          sbit    rw      =       P2^1;
  17          sbit    e       =       P2^2;
  18          sfr             db      =       0x90;
  19          
  20          #include "6800.h"
  21          #include "image.h"
  22          #include "lcd_test.h"
  23          
  24          void main()
  25          {
  26   1              unsigned char i,j;
  27   1      
  28   1              delay_us(0);
  29   1              delay_ms(0);
  30   1              delay_ss(0);
  31   1      //      isp_init();
  32   1      
  33   1              while(1)
  34   1              {
  35   2                      res=0;                  //模块复位
  36   2                      delay_ss(1);
  37   2                      res=1;
  38   2      
  39   2                      cs=0;                   //模块选择      
  40   2      
  41   2                      while(1)
  42   2                      {
  43   3       
  44   3                              write_com(0x30);        // ext=0
  45   3                              write_com(0x94);        // sleep out
  46   3                              write_com(0xd1);        // osc on
  47   3                              write_com(0x20);        // power control set
  48   3                              write_dat(0x08);        // booster must be on first
  49   3                              delay_ms(2);
  50   3                              write_com(0x20);        // power control set
  51   3                              write_dat(0x0b);        // booster,regulator follower on
  52   3                              write_com(0x81);        // electronic control
  53   3                              write_dat(43);  // set vop      low: 00~3f                      0x35,0x03=13.55
  54   3                              write_dat(0x03);        //                  hige:00~07                  0x28,0x03=13.0                  
  55   3                              write_com(0xca);        // display control
C51 COMPILER V8.02   MAIN                                                                  01/18/2007 14:09:34 PAGE 2   

  56   3                              write_dat(0x04);        //                                                              ****分频        
  57   3                              write_dat(31);  // 1f duty=1/128
  58   3                              write_dat(0x00);        //      ;10GOOD;
  59   3                                                                                      
  60   3                              write_com(0xa6);        // normal display
  61   3                              
  62   3      
  63   3                              write_com(0xbb);        // com scan direction
  64   3                              write_dat(0x03);        // 0~79,159~80
  65   3      
  66   3                              write_com(0xbc);        // data scan direction
  67   3                              write_dat(0x02);        //
  68   3                              write_dat(0x01);        //
  69   3                              write_dat(0x02);        //
  70   3      
  71   3                              write_com(0x75);        // line address set
  72   3                              write_dat(0x00);        // start line =0
  73   3                              write_dat(127); // end line =127
  74   3      
  75   3                              write_com(0x15);        // column address set
  76   3                              write_dat(0x00);        // start column =0
  77   3                              write_dat(0x4f);        // end column =79
  78   3      
  79   3                              write_com(0x31);        // ext=1
  80   3                              write_com(0x20);        // set gray level
  81   3                              for(i=0;i<16;i++)
  82   3                              {
  83   4                                      write_dat(1);
  84   4                              }
  85   3              
  86   3                              write_com(0x21);
  87   3                              for(i=0;i<16;i++)
  88   3                              {
  89   4                                      write_dat(1);
  90   4                              }
  91   3              
  92   3                              write_com(0x32);        // analog circuit set
  93   3                              write_dat(0x01);        // osc frequency=000 (default)                  ****
  94   3                              write_dat(0x00);        // booster efficiency=01 (default)
  95   3                              write_dat(0x02);        // bias=1/7,1/12=0x02                                   ****
  96   3                              write_com(0x34);        // dithering off
  97   3                              ReadEEPROM();           // read eeprom flow
  98   3                              write_com(0xaf);        // display on
  99   3              
 100   3                              write_com(0x5c);        // write data
 101   3      
 102   3      
 103   3      
 104   3              lcd_full();
 105   3              delay_ss(1);
 106   3         for(;;)
 107   3         {
 108   4      
 109   4              write_com(0x5c);        // write data
 110   4              lcd_image(image_yes);
 111   4              delay_ss(1);
 112   4              
 113   4               }
 114   3      
 115   3         
 116   3                      }
 117   2              }
C51 COMPILER V8.02   MAIN                                                                  01/18/2007 14:09:34 PAGE 3   

 118   1      }
*** WARNING C280 IN LINE 26 OF MAIN.C: 'j': unreferenced local variable


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    636    ----
   CONSTANT SIZE    =   3840    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----       5
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


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

⌨️ 快捷键说明

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