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

📄 init.lst

📁 这是2100的工程模板
💻 LST
字号:
C51 COMPILER V6.23a  INIT                                                                  01/09/2006 10:00:42 PAGE 1   


C51 COMPILER V6.23a, COMPILATION OF MODULE INIT
OBJECT MODULE PLACED IN init.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE init.c BROWSE DEBUG OBJECTEXTEND

stmt level    source

   1          #include "main.h"
   2          #include "function.h"
   3          
   4          void INIT(void)
   5          {
   6   1        
   7   1        SSD1300_init();
   8   1        delayms(5);
   9   1        
  10   1      }
  11          
  12          
  13          
  14          void SSD1300_init(void)
  15          {
  16   1      
  17   1        writem(0xA4);//display off
  18   1      
  19   1        writem(0xA0);//set re-map
  20   1      
  21   1        writem(0x50);//set display start line         ?????
  22   1      
  23   1        writed(0xC8);//set com output direction
  24   1      
  25   1        writem(0x2E);//stop horizontal scrolling
  26   1      
  27   1        writem(0x26);//horizontal scroll setup
  28   1        writem(0x01);//                                ????
  29   1        writem(0x02);
  30   1        writem(0x03);//                                ????
  31   1        writem(0x05);
  32   1      
  33   1      
  34   1        writem(0x91);//setup bank0 colour
  35   1        writem(0x07);
  36   1        writem(0x17);
  37   1        writem(0x27);
  38   1        
  39   1        writem(0xD3);//set display offset
  40   1        writed(0x00);//                                ????
  41   1      
  42   1        //writem(0xDA);//set hard squence
  43   1        //writed(0x12);
  44   1      
  45   1        writem(0xA8);//set mu ratio
  46   1        writed(0x20);//                                ????
  47   1      
  48   1        writem(0xA6);//reset normal display
  49   1      
  50   1      
  51   1      
  52   1        //writem(0xB1);//SET PHASE LENGTH
  53   1        //writed(0x4);
  54   1        //writed(0x7);
  55   1      
C51 COMPILER V6.23a  INIT                                                                  01/09/2006 10:00:42 PAGE 2   

  56   1        //writem(0xB1);
  57   1        //writed(0x40);
  58   1      
  59   1      
  60   1        writem(0xD5);//front clock divider /oscillator frequency
  61   1        writed(0xEE);//随便写入的
  62   1        //writed(0x0);
  63   1      
  64   1        writem(0x81);//set contrast register
  65   1        writed(0x60);
  66   1      
  67   1        writem(0xDB);//set pre-charge voltage of color A B C
  68   1        writed(0x7F);
  69   1        //writed(0x5);
  70   1      
  71   1        delayms(50);
  72   1      
  73   1        writem(0xAD);//set dc-dc on
  74   1        writem(0x8B);//
  75   1      
  76   1        //writem(0xA5);//display on
  77   1        writem(0xAF);//display on
  78   1      
  79   1      }
  80          
  81          
  82          
  83          void RAM_ADDRESS(void)
  84          {
  85   1      
  86   1        writem(0x00);//128*128,row
  87   1        writed(0x10);
  88   1        writem(0xB2);//set page address
  89   1      
  90   1      }
  91          
  92          void writem(unsigned char c1)//命令
  93          {
  94   1        dc=0;
  95   1        rd=1;
  96   1        cs=0;
  97   1        P0=c1;
  98   1        wr=0;
  99   1        wr=1;
 100   1        cs=1;
 101   1      }
 102          
 103          
 104          
 105          void writed(unsigned char c2)//
 106          {
 107   1        dc=0;
 108   1        rd=1;
 109   1        cs=0;
 110   1        P0=c2;
 111   1        wr=0;
 112   1        wr=1;
 113   1        cs=1;
 114   1      }
 115          void writed1(unsigned char c2)//数据
 116          {
 117   1        dc=1;
C51 COMPILER V6.23a  INIT                                                                  01/09/2006 10:00:42 PAGE 3   

 118   1        rd=1;
 119   1        cs=0;
 120   1        P0=c2;
 121   1        wr=0;
 122   1        wr=1;
 123   1        cs=1;
 124   1      }


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


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

⌨️ 快捷键说明

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