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

📄 22.lst

📁 这是基于4*4键盘
💻 LST
📖 第 1 页 / 共 3 页
字号:
C51 COMPILER V8.02   22                                                                    07/18/2007 12:34:07 PAGE 1   


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

line level    source

   1          #include <reg52.h>                              // 引用标准库的头文件
   2          #include <intrins.h>
   3          
   4          #define  uchar  unsigned  char 
   5          #define  uint   unsigned  int 
   6          sbit RS  = P2^1;
   7          sbit RW  = P2^4;
   8          sbit E   = P2^5;
   9          
  10          char bdata temp_ramaddr;
  11          sbit BF = temp_ramaddr^7;
  12          
  13          int  keycode,picture_data;
  14          void KeyDisplay(void);
  15          void LCD_write_picture(void);
  16          
  17          int  i,j;
  18          int  peak_data,peak_data,frequency_data,trace; 
  19          char *ip1,*ip2,*ip3,*ip4;
  20          uchar  numbit;  
  21          char idata peak_digit[5][16]={
  22          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  23          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  24          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  25          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  26          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}};
  27          char idata frequency_digit[5][16]={
  28          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  29          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  30          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  31          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  32          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}};
  33          
  34          char code picture1[256] = {
  35          0x00,0x00,0x00,0x40,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  36          0x7F,0xFE,0xF8,0x20,0x10,0x40,0x00,0x00,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,
  37          0x00,0x80,0x0B,0xFE,0x10,0x40,0x00,0x00,0x18,0x30,0x00,0x00,0x00,0x00,0x00,0x00,
  38          0x00,0x80,0x08,0x00,0x07,0xFE,0x00,0x00,0x20,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
  39          0x00,0x80,0x78,0x40,0x84,0x44,0x00,0x00,0x40,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
  40          0x00,0x80,0x48,0x48,0x54,0x40,0x00,0x00,0x40,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
  41          0x10,0x80,0x40,0x8C,0x54,0x40,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,
  42          0x10,0xFC,0x41,0x78,0x17,0xF8,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
  43          0x10,0x80,0xFB,0xD0,0x25,0x08,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,
  44          0x10,0x80,0x48,0x20,0x24,0x90,0x30,0x00,0x00,0x00,0xC0,0x01,0x00,0x00,0x00,0x00,
  45          0x10,0x80,0x08,0x40,0xE4,0x90,0x30,0x00,0x00,0x00,0x20,0x02,0x00,0x00,0x00,0x00,
  46          0x10,0x80,0x08,0x88,0x24,0x60,0x00,0x00,0x00,0x00,0x20,0x02,0x00,0x00,0x00,0x00,
  47          0x10,0x80,0x09,0x04,0x28,0x60,0x30,0x00,0x00,0x00,0x10,0x04,0x00,0x00,0x00,0x00,
  48          0xFF,0xFE,0x4B,0xFE,0x28,0x98,0x30,0x00,0x00,0x00,0x0C,0x18,0x00,0x00,0x00,0x00,
  49          0x00,0x00,0x29,0x04,0x31,0x0E,0x00,0x00,0x00,0x00,0x03,0xE0,0x00,0x00,0x00,0x00,
  50          0x00,0x00,0x10,0x00,0x26,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};         //正 弦 波
  51          
  52          char code picture2[256]={
  53          0x00,0x00,0x04,0x00,0x20,0x40,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
  54          0x00,0x00,0x07,0xF8,0x10,0x40,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,0x00,0x00,
  55          0x7F,0xFC,0x04,0x10,0x10,0x40,0x00,0x00,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
C51 COMPILER V8.02   22                                                                    07/18/2007 12:34:07 PAGE 2   

  56          0x00,0x00,0x08,0x20,0x07,0xFE,0x00,0x00,0x08,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
  57          0x00,0x00,0x1F,0xFC,0x84,0x44,0x00,0x00,0x10,0x08,0x00,0x00,0x00,0x00,0x00,0x00,
  58          0x00,0x00,0x30,0x84,0x54,0x40,0x00,0x00,0x20,0x04,0x00,0x00,0x00,0x00,0x00,0x00,
  59          0x00,0x00,0x50,0x84,0x54,0x40,0x00,0x00,0x40,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
  60          0x3F,0xF8,0x1F,0xFC,0x17,0xF8,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
  61          0x00,0x00,0x10,0x84,0x25,0x08,0x00,0x00,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,
  62          0x00,0x00,0x10,0x84,0x24,0x90,0x30,0x00,0x00,0x00,0x40,0x02,0x00,0x00,0x00,0x00,
  63          0x00,0x00,0x1F,0xFC,0xE4,0x90,0x30,0x00,0x00,0x00,0x20,0x04,0x00,0x00,0x00,0x00,
  64          0x00,0x00,0x10,0x84,0x24,0x60,0x00,0x00,0x00,0x00,0x10,0x08,0x00,0x00,0x00,0x00,
  65          0x00,0x00,0x10,0x84,0x28,0x60,0x30,0x00,0x00,0x00,0x08,0x10,0x00,0x00,0x00,0x00,
  66          0x7F,0xFE,0x20,0x84,0x28,0x98,0x30,0x00,0x00,0x00,0x04,0x20,0x00,0x00,0x00,0x00,
  67          0x00,0x00,0x20,0x94,0x31,0x0E,0x00,0x00,0x00,0x00,0x02,0x40,0x00,0x00,0x00,0x00,
  68          0x00,0x00,0x40,0x88,0x26,0x04,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00};      //三 角 波
  69          
  70          char code picture3[256]={
  71          0x02,0x00,0x00,0x00,0x20,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  72          0x01,0x00,0x00,0x00,0x10,0x40,0x00,0x00,0x7F,0x81,0xFE,0x00,0x00,0x00,0x00,0x00,
  73          0x00,0x80,0x00,0x00,0x10,0x40,0x00,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  74          0xFF,0xFE,0x00,0x00,0x07,0xFE,0x00,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  75          0x02,0x00,0x00,0x00,0x84,0x44,0x00,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  76          0x02,0x00,0x00,0x00,0x54,0x40,0x00,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  77          0x03,0xF0,0x00,0x00,0x54,0x40,0x00,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  78          0x02,0x10,0x00,0x00,0x17,0xF8,0x00,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  79          0x04,0x10,0x00,0x00,0x25,0x08,0x00,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  80          0x04,0x10,0x00,0x00,0x24,0x90,0x30,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  81          0x08,0x10,0x00,0x00,0xE4,0x90,0x30,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  82          0x08,0x10,0x00,0x00,0x24,0x60,0x00,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  83          0x10,0x10,0x00,0x00,0x28,0x60,0x30,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  84          0x20,0x90,0x00,0x00,0x28,0x98,0x30,0x00,0x40,0x81,0x02,0x00,0x00,0x00,0x00,0x00,
  85          0xC0,0x60,0x00,0x00,0x31,0x0E,0x00,0x00,0x40,0xFF,0x03,0xFC,0x00,0x00,0x00,0x00,
  86          0x00,0x00,0x00,0x00,0x26,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};       //方 波
  87          
  88          char code peak[128]={
  89          0x20,0x80,0x20,0x80,0x10,0x40,0x00,0x00,
  90          0x20,0xFC,0x20,0xFC,0x18,0x60,0x00,0x00,
  91          0x20,0x88,0x20,0x88,0x17,0xFC,0x00,0x00,
  92          0xA9,0x88,0xA9,0x88,0x10,0x40,0x00,0x00,
  93          0xAA,0x50,0xAA,0x50,0x20,0x80,0x00,0x00,
  94          0xAC,0x20,0xAC,0x20,0x33,0xF8,0x00,0x00,
  95          0xA8,0xDC,0xA8,0xDC,0x62,0x08,0x00,0x00,
  96          0xAB,0x48,0xAB,0x48,0xA3,0xF8,0x00,0x00,
  97          0xA8,0x40,0xA8,0x40,0x22,0x08,0x00,0x00,
  98          0xAB,0xFC,0xAB,0xFC,0x23,0xF8,0x30,0x00,
  99          0xB8,0x40,0xB8,0x40,0x22,0x08,0x30,0x00,
 100          0xEB,0xFC,0xEB,0xFC,0x23,0xF8,0x00,0x00,
 101          0x80,0x40,0x80,0x40,0x22,0x08,0x30,0x00,
 102          0x07,0xFE,0x07,0xFE,0x22,0x08,0x30,0x00,
 103          0x00,0x40,0x00,0x40,0x2F,0xFE,0x00,0x00,
 104          0x00,0x40,0x00,0x40,0x20,0x00,0x00,0x00};       //峰峰值
 105          
 106          char code frequency[128]={
 107          0x08,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
 108          0x08,0xFE,0x00,0x00,0x01,0x00,0x00,0x00,
 109          0x4E,0x20,0x00,0x00,0x7F,0xFE,0x00,0x00,
 110          0x48,0x40,0x00,0x00,0x41,0x00,0x00,0x00,
 111          0x48,0xFC,0x00,0x00,0x22,0x28,0x00,0x00,
 112          0xFE,0x84,0x00,0x00,0x17,0xD0,0x00,0x00,
 113          0x00,0xA4,0x00,0x00,0x04,0x80,0x00,0x00,
 114          0x08,0xA4,0x00,0x00,0x11,0x10,0x00,0x00,
 115          0x4A,0xA4,0x00,0x00,0x22,0x48,0x00,0x00,
 116          0x4A,0xA4,0x00,0x00,0x47,0xC4,0x30,0x00,
 117          0x84,0xA4,0x00,0x00,0x01,0x20,0x30,0x00,
C51 COMPILER V8.02   22                                                                    07/18/2007 12:34:07 PAGE 3   

 118          0x08,0x50,0x00,0x00,0xFF,0xFE,0x00,0x00,
 119          0x10,0x48,0x00,0x00,0x01,0x00,0x30,0x00,
 120          0x20,0x86,0x00,0x00,0x01,0x00,0x30,0x00,
 121          0xC3,0x02,0x00,0x00,0x01,0x00,0x00,0x00,
 122          0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00};        //频率 
 123          
 124          //数字及小数点 
 125          
 126          char code number[11][16]={
 127          {0x00,0x00,0x00,0x10,0x70,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x7C,0x00,0x00},/*"1",0*/
 128          
 129          {0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x04,0x04,0x08,0x10,0x20,0x42,0x7E,0x00,0x00},/*"2",1*/
 130          
 131          {0x00,0x00,0x00,0x3C,0x42,0x42,0x04,0x18,0x04,0x02,0x02,0x42,0x44,0x38,0x00,0x00},/*"3",2*/
 132          
 133          {0x00,0x00,0x00,0x04,0x0C,0x14,0x24,0x24,0x44,0x44,0x7E,0x04,0x04,0x1E,0x00,0x00},/*"4",3*/
 134          
 135          {0x00,0x00,0x00,0x7E,0x40,0x40,0x40,0x58,0x64,0x02,0x02,0x42,0x44,0x38,0x00,0x00},/*"5",4*/
 136          
 137          {0x00,0x00,0x00,0x1C,0x24,0x40,0x40,0x58,0x64,0x42,0x42,0x42,0x24,0x18,0x00,0x00},/*"6",5*/
 138          
 139          {0x00,0x00,0x00,0x7E,0x44,0x44,0x08,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00},/*"7",6*/
 140          
 141          {0x00,0x00,0x00,0x3C,0x42,0x42,0x42,0x24,0x18,0x24,0x42,0x42,0x42,0x3C,0x00,0x00},/*"8",7*/
 142          
 143          {0x00,0x00,0x00,0x18,0x24,0x42,0x42,0x42,0x26,0x1A,0x02,0x02,0x24,0x38,0x00,0x00},/*"9",8*/
 144          
 145          {0x00,0x00,0x00,0x18,0x24,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x24,0x18,0x00,0x00},/*"0",9*/
 146          
 147          {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x00,0x00}/*".",10*/ };
 148          
 149          //单位
 150          
 151          char code unit1[16]={0x00,0x00,0x00,0xC0,0x40,0x40,0x40,0x4E,0x48,0x50,0x68,0x48,0x44,0xEE,0x00,0x00};/*"k
             -",0*/
 152          
 153          char code unit2[16]={0x00,0x00,0x00,0xE7,0x42,0x42,0x42,0x42,0x7E,0x42,0x42,0x42,0x42,0xE7,0x00,0x00};/*"H
             -",1*/
 154          
 155          char code unit3[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x44,0x08,0x10,0x10,0x22,0x7E,0x00,0x00};/*"z
             -",2*/
 156          
 157          char code unit4[16]={0x00,0x00,0x00,0xEE,0x6C,0x6C,0x6C,0x6C,0x54,0x54,0x54,0x54,0x54,0xD6,0x00,0x00};/*"M
             -",3*/
 158          
 159          char code unit5[16]={0x00,0x00,0x00,0xE7,0x42,0x42,0x44,0x24,0x24,0x28,0x28,0x18,0x10,0x10,0x00,0x00};/*"V
             -",4*/
 160          
 161          char code unit6[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x49,0x49,0x49,0x49,0x49,0xED,0x00,0x00};/*"m
             -",5*/
 162          
 163          char code blank[16]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};//空
             -字符 
 164          
 165          
 166          //**** 延时155us ****
 167          void delay_155us()
 168          {
 169   1         int  i;
 170   1         for(i=0;i<10;i++){}   
 171   1      }
 172          
C51 COMPILER V8.02   22                                                                    07/18/2007 12:34:07 PAGE 4   

 173          //**** 延时8ms的整数倍 ****
 174          void delay_8ms(int delay_8ms_time)
 175          {
 176   1         int  i,j;
 177   1         for(i=0;i<delay_8ms_time;i++)
 178   1          {
 179   2            for(j=0;j<100;j++){}
 180   2          }
 181   1      }
 182          //**** 延时0.5s的整数倍 ****
 183          void delay_half_1s(int delay_half_1s_time)
 184          {
 185   1         int  i,j,k;
 186   1      
 187   1         for(i=0;i<delay_half_1s_time;i++)
 188   1          {
 189   2            for(j=0;j<255;j++)
 190   2             {
 191   3               for(k=0;k<255;k++){}
 192   3             }
 193   2          }   
 194   1      
 195   1      }
 196          
 197          
 198          //*********** 写数据子程序 *****
 199          void LCD_write_data(char data_data)
 200          { 
 201   1         BF = 1;
 202   1      
 203   1         RS = 0;
 204   1         RW = 1;  
 205   1         while(BF)
 206   1          { 
 207   2            P1 = 0xFF;

⌨️ 快捷键说明

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