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

📄 digit_tube.lst

📁 小区可视对讲键盘检测程序.利用pt6964芯片.
💻 LST
字号:
C51 COMPILER V8.08   DIGIT_TUBE                                                            05/25/2008 20:21:42 PAGE 1   


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

line level    source

   1          /*--------------------------------------
   2          includes
   3          --------------------------------------*/
   4          #include<stc12c5410ad.h>
   5          #include<delay.h>
   6          /*--------------------------------------
   7          extern variables
   8          --------------------------------------*/
   9          extern unsigned char display_buffer[4];
  10          extern unsigned char number_code[11];
  11          extern unsigned char refresh_index;
  12          /*--------------------------------------
  13          funcinons 
  14          --------------------------------------*/
  15          void digit_tube_initial(void)
  16          {
  17   1              P1M0 = P1M0 & 0x01;     //P1,1234567输出
  18   1              P1M1 = P1M1 | 0xfe;
  19   1              P2M0 = P2M0 & 0xf0;      //P2,0123输出
  20   1              P2M1 = P2M1 | 0x0f;
  21   1      }
  22          void digit_tube_test(void)
  23          {
  24   1              P22=0;P23=0;P11=0;P13=0;
  25   1              P21=0;P12=0;P15=0;P16=0;P17=0;P20=0;P14=0;
  26   1              delay(100);
  27   1              P22=1;P23=1;P11=1;P13=1;
  28   1              P21=1;P12=1;P15=1;P16=1;P17=1;P20=1;P14=1;
  29   1      }
  30          void refresh_digit_tube(void)
  31          {
  32   1              refresh_index++;
  33   1              if(refresh_index >= 5) refresh_index = 1;
  34   1              
  35   1              if(refresh_index == 1)
  36   1              {
  37   2               P23 = 0;   //设置位选线电平
  38   2               P22 = 1;
  39   2               P11 = 1;
  40   2               P13 = 1;
  41   2               //设置段选线电平
  42   2               if((number_code[display_buffer[0]])&0x80)P21=0;else P21=1;
  43   2               if((number_code[display_buffer[0]])&0x40)P12=0;else P12=1;
  44   2               if((number_code[display_buffer[0]])&0x20)P15=0;else P15=1;
  45   2               if((number_code[display_buffer[0]])&0x10)P16=0;else P16=1;
  46   2               if((number_code[display_buffer[0]])&0x08)P17=0;else P17=1;
  47   2               if((number_code[display_buffer[0]])&0x04)P20=0;else P20=1;
  48   2               if((number_code[display_buffer[0]])&0x02)P14=0;else P14=1;                                
  49   2      
  50   2              }
  51   1              if(refresh_index == 2)
  52   1              {
  53   2               P23 = 1;       //设置位选线电平
  54   2               P22 = 0;
  55   2               P11 = 1;
C51 COMPILER V8.08   DIGIT_TUBE                                                            05/25/2008 20:21:42 PAGE 2   

  56   2               P13 = 1;
  57   2               //设置段选线电平
  58   2               if((number_code[display_buffer[1]])&0x80)P21=0;else P21=1;
  59   2               if((number_code[display_buffer[1]])&0x40)P12=0;else P12=1;
  60   2               if((number_code[display_buffer[1]])&0x20)P15=0;else P15=1;
  61   2               if((number_code[display_buffer[1]])&0x10)P16=0;else P16=1;
  62   2               if((number_code[display_buffer[1]])&0x08)P17=0;else P17=1;
  63   2               if((number_code[display_buffer[1]])&0x04)P20=0;else P20=1;
  64   2               if((number_code[display_buffer[1]])&0x02)P14=0;else P14=1;             
  65   2              }
  66   1              if(refresh_index == 3)
  67   1              {
  68   2               P23 = 1;        //设置位选线电平
  69   2               P22 = 1;
  70   2               P11 = 0;
  71   2               P13 = 1;
  72   2               //设置段选线电平
  73   2               if((number_code[display_buffer[2]])&0x80)P21=0;else P21=1;
  74   2               if((number_code[display_buffer[2]])&0x40)P12=0;else P12=1;
  75   2               if((number_code[display_buffer[2]])&0x20)P15=0;else P15=1;
  76   2               if((number_code[display_buffer[2]])&0x10)P16=0;else P16=1;
  77   2               if((number_code[display_buffer[2]])&0x08)P17=0;else P17=1;
  78   2               if((number_code[display_buffer[2]])&0x04)P20=0;else P20=1;
  79   2               if((number_code[display_buffer[2]])&0x02)P14=0;else P14=1;             
  80   2              }
  81   1              if(refresh_index == 4)
  82   1              {
  83   2               P23 = 1;         //设置位选线电平
  84   2               P22 = 1;
  85   2               P11 = 1;
  86   2               P13 = 0;
  87   2               //设置段选线电平
  88   2               if((number_code[display_buffer[3]])&0x80)P21=0;else P21=1;
  89   2               if((number_code[display_buffer[3]])&0x40)P12=0;else P12=1;
  90   2               if((number_code[display_buffer[3]])&0x20)P15=0;else P15=1;
  91   2               if((number_code[display_buffer[3]])&0x10)P16=0;else P16=1;
  92   2               if((number_code[display_buffer[3]])&0x08)P17=0;else P17=1;
  93   2               if((number_code[display_buffer[3]])&0x04)P20=0;else P20=1;
  94   2               if((number_code[display_buffer[3]])&0x02)P14=0;else P14=1;                     
  95   2               
  96   2              }
  97   1      
  98   1        
  99   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    437    ----
   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 + -