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

📄 1.lst

📁 十几个proteus的仿真实例
💻 LST
📖 第 1 页 / 共 2 页
字号:
C51 COMPILER V8.02   1                                                                     01/26/2007 16:52:24 PAGE 1   


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

line level    source

   1          #include <reg51.h>
   2          sbit e=P3^0;
   3          sbit rw=P3^1;
   4          sbit rs=0xb2;
   5          sbit cs2=0xb3;
   6          sbit cs1=0xb4;
   7          sbit busy=0xa7;
   8          
   9          unsigned char code nBitmapDot[] =                  // 数据表
  10          {
  11                0x08,0x08,0x0F,0xF8,0x08,0x0F,0x01,0x41,0x41,0x41,0x4F,0x51,0x61,0x41,0x01,0x00,
  12          0x01,0xC2,0x44,0x28,0x30,0xCE,0x04,0x00,0x02,0x01,0xFE,0x00,0x00,0x00,0x00,0x00
  13          
  14          };
  15          
  16          /*unsigned char code nBitmapDot1[] =                  // 数据表
  17          {
  18                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  19                0x03,0x04,0x08,0x08,0x08,0x04,0x3B,0x4C,
  20                0x5C,0x3B,0x04,0x05,0x05,0x03,0x70,0x0C,
  21                0x7E,0x00,0x02,0x01,0x00,0x00,0x00,0x00,
  22                0x06,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
  23                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  24                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,
  25                0x05,0x09,0x11,0x2B,0x27,0x0E,0x4E,0x3D,
  26                0x1E,0x1C,0x1C,0x7C,0x3E,0x1F,0x1F,0x1F,
  27                0x0F,0x0F,0x0F,0x07,0x03,0x03,0x02,0x04,
  28                0x00,0x00,0x00,0x00,0x7F,0x5F,0x7F,0x7F,
  29                0x7F,0x7F,0x7F,0x7F,0x7F,0x3F,0x7F,0x7F,
  30                0x78,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  31                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  32                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  33                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  34                0x00,0x00,0x01,0x72,0x8C,0x84,0x84,0x84,
  35                0xE4,0x1F,0x09,0x2B,0x4F,0x17,0xE2,0x82,
  36                0x82,0x8B,0xC4,0xB8,0x81,0x02,0x04,0x19,
  37                0x20,0xC1,0x3C,0x09,0x8F,0x7C,0x73,0xEE,
  38                0xC6,0xC3,0xC3,0xE4,0xFC,0x7F,0x7F,0x3F,
  39                0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
  40                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  41                0x00,0x70,0xE0,0x8F,0x3F,0x7F,0xFF,0xFF,
  42                0x3F,0x1F,0x19,0x19,0x27,0xE7,0xFF,0x3B,
  43                0x3F,0xF3,0xF3,0xFF,0xFD,0xFF,0xF7,0x78,
  44                0x1F,0x08,0x00,0x02,0xFC,0xF1,0xC2,0x8E,
  45                0x92,0x92,0x91,0x80,0xC0,0xF0,0xCF,0x00,
  46                0x00,0x11,0x00,0x55,0x00,0x00,0x00,0x00,
  47                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  48                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  49                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  50                0x03,0x03,0xC7,0x2B,0x12,0x11,0x50,0xA0,
  51                0x7C,0x83,0xA2,0x8B,0x87,0xFF,0x1F,0x0F,
  52                0x0F,0x1F,0xEE,0x8B,0x0C,0x09,0x00,0x55,
  53                0x00,0x11,0x00,0x84,0x71,0x0E,0xF8,0xFF,
  54                0x7F,0xFF,0xFF,0xFC,0xFC,0xFC,0xFE,0xF9,
  55                0xFF,0xFC,0x00,0x00,0x01,0x01,0x01,0x01,
C51 COMPILER V8.02   1                                                                     01/26/2007 16:52:24 PAGE 2   

  56                0x01,0x01,0x01,0x02,0x02,0x02,0x02,0x02,
  57                0x02,0x03,0x00,0xC0,0xF0,0xFC,0xFE,0xFE,
  58                0xFF,0xFD,0xFC,0xF8,0xF0,0xF0,0xF0,0xF1,
  59                0xF1,0xF3,0xC7,0xEF,0x9E,0xF8,0xE0,0x00,
  60                0x00,0x00,0x01,0x06,0x01,0xE1,0x20,0x80,
  61                0x00,0x21,0xC1,0x02,0x0C,0x31,0xC0,0x15,
  62                0x00,0x11,0x00,0x55,0x00,0x00,0x00,0x00,
  63                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  64                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  65                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  66                0x47,0xAB,0xEF,0xDF,0xF6,0x5E,0xEE,0x3E,
  67                0x5E,0xFF,0x4E,0xAE,0xEE,0xEE,0xEE,0xA6,
  68                0xC7,0x57,0x83,0x53,0x00,0x11,0x00,0x55,
  69                0x00,0x11,0x00,0x05,0xF0,0x0D,0x02,0x41,
  70                0x88,0xD4,0x52,0x52,0x4E,0x50,0xC8,0x80,
  71                0x00,0x00,0x00,0x00,0x80,0x60,0x78,0x7F,
  72                0x7F,0x7F,0x7F,0xFF,0xFE,0xFE,0xFE,0xFC,
  73                0xFC,0xFF,0x00,0x00,0x00,0x00,0x80,0x80,
  74                0xC0,0xC0,0xD8,0xC4,0xC4,0xC4,0xC4,0xC4,
  75                0xA4,0xA8,0x30,0x01,0x01,0x02,0x04,0x0E,
  76                0x14,0x62,0x81,0x53,0x02,0x14,0x84,0x9C,
  77                0xA2,0x41,0x41,0x41,0x22,0x1E,0x02,0x52,
  78                0x02,0x11,0x00,0x53,0x04,0x00,0x00,0x00,
  79                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  80                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  81                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  82                0xF4,0x68,0xBF,0xB6,0xBF,0x5F,0x57,0x46,
  83                0xC6,0x56,0xBF,0x5F,0x66,0x46,0x59,0xB9,
  84                0xA6,0xA6,0x58,0xB4,0x00,0x11,0x00,0x54,
  85                0x00,0x11,0x00,0x44,0x00,0x11,0x00,0x54,
  86                0x80,0x51,0x40,0x24,0x20,0x11,0x10,0x08,
  87                0x08,0x08,0x04,0x05,0x05,0x06,0x02,0x04,
  88                0x84,0xC4,0xA4,0x24,0x24,0x24,0x22,0x22,
  89                0x42,0x83,0x05,0x05,0x06,0x04,0x04,0x0C,
  90                0x08,0x08,0x08,0x18,0x18,0x18,0x28,0x28,
  91                0x48,0x44,0x84,0x02,0x02,0x02,0x01,0x01,
  92                0x01,0x01,0x00,0xC0,0x20,0x20,0x3C,0x23,
  93                0x41,0xC1,0xC1,0xE2,0x1F,0x10,0x10,0x10,
  94                0x18,0xE4,0x03,0x94,0x40,0x00,0x00,0x00,
  95                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  96                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  97                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  98                0x10,0x10,0xF0,0xEC,0xF6,0xFE,0xFE,0xFA,
  99                0x02,0xEA,0xDE,0xBE,0x7E,0x7E,0xFE,0xFE,
 100                0x7C,0x70,0x10,0x50,0x00,0x10,0x10,0x10,
 101                0x10,0x10,0x10,0x50,0x10,0x10,0x10,0x10,
 102                0x10,0x10,0x10,0x50,0x10,0x30,0x30,0x50,
 103                0x50,0x90,0xB0,0x10,0x08,0x08,0x04,0x04,
 104                0x04,0x02,0x02,0x02,0x02,0x02,0x02,0x04,
 105                0x04,0x78,0x84,0x02,0x02,0x02,0x02,0x02,
 106                0x02,0x02,0x02,0x02,0x02,0x04,0x04,0x04,
 107                0x08,0x10,0x30,0x10,0x10,0x10,0x10,0x10,
 108                0x10,0x10,0x90,0x90,0x90,0x50,0x50,0xB0,
 109                0x10,0x10,0x10,0x10,0x90,0x70,0x10,0x10,
 110                0x10,0x10,0x10,0x90,0x50,0x00,0x00,0x00,
 111                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 112                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 113                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 114                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 115                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 116                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 117                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
C51 COMPILER V8.02   1                                                                     01/26/2007 16:52:24 PAGE 3   

 118                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 119                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 120                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 121                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 122                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 123                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 124                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 125                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 126                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 127                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 128                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 129                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 130                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 131                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 132                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 133                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 134                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 135                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 136                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 137                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 138                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 139                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 140                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 141                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 142                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 143                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 144                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
 145                0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
 146          }; */
 147          
 148          
 149          void pulse()
 150                  {
 151   1              e=1;
 152   1              e=0;
 153   1              }
 154          
 155          void busy_check(char right)
 156                  {
 157   1              P2=0xff;
 158   1              if (right==1)
 159   1                      {
 160   2                      P3=0x13;
 161   2                      while(!busy);
 162   2                      }
 163   1              if (right==0)
 164   1                      {
 165   2                      P3=0x0b;
 166   2                      while(!busy);
 167   2                      }
 168   1              }
 169          
 170          void cmd_w(char cmd,char right)
 171                  {
 172   1              busy_check(right);
 173   1              if (right==1)
 174   1                      {
 175   2                      P3=0x10;
 176   2                      }
 177   1              if (right==0)
 178   1                      {
 179   2                      P3=0x08;
C51 COMPILER V8.02   1                                                                     01/26/2007 16:52:24 PAGE 4   

 180   2                      P3=0x08;
 181   2                      }
 182   1              P2=cmd;
 183   1              pulse();
 184   1              }
 185          
 186          void data_w(char dat,char right)
 187                  {
 188   1              busy_check(right);
 189   1              if (right==1)
 190   1                      {
 191   2                      P3=0x14;
 192   2                      }
 193   1              if (right==0)
 194   1                      {
 195   2                      P3=0x0c;
 196   2                      }
 197   1              P2=dat;
 198   1              pulse();
 199   1              }
 200          
 201          void lcd_init()
 202                  {
 203   1              unsigned int i;
 204   1              cmd_w(0x3e+1,0);//显示开关
 205   1              cmd_w(0xc0+0,0);//修改显示起始行
 206   1              cmd_w(0xb8+0,0);//修改页地址
 207   1              cmd_w(0x40+0,0);//修改列地址
 208   1              cmd_w(0x3e+1,1);
 209   1              cmd_w(0xc0+0,1);
 210   1              cmd_w(0xb8+0,1);
 211   1              cmd_w(0x40+0,1);
 212   1              for(i=0;i<256;i++)
 213   1                      {
 214   2                      data_w(0x00,0);
 215   2                      }
 216   1      
 217   1              cmd_w(0xb8+4,0);
 218   1              cmd_w(0x40+8,0);
 219   1              for(i=0;i<256;i++)
 220   1                      {
 221   2                      data_w(0x00,0);
 222   2                      }

⌨️ 快捷键说明

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