C51 COMPILER V9.01   LEDDONGTAIXIANSHI                                                     12/15/2014 10:49:58 PAGE 1   


C51 COMPILER V9.01, COMPILATION OF MODULE LEDDONGTAIXIANSHI
OBJECT MODULE PLACED IN leddongtaixianshi.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE leddongtaixianshi.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          #include<reg52.h>
   2          #define uchar unsigned char
   3          #define uint  unsigned int
   4          uchar code table[4] = {0xC0,0xF9,0xA4,0xB0}; //段选
   5          uchar code table1[4]={0x01,0x02,0x04,0x08};     //位选
   6          void Delay(uint i)
   7          {
   8   1              uchar x,j;
   9   1              for(j=0;j<i;j++)
  10   1              for(x=0;x<=148;x++);    
  11   1      }
  12           void Main(void)
  13          {
  14   1              uchar i;
  15   1              while(1)
  16   1              {
  17   2                      for(i=0;i<4;i++)
  18   2                      {       
  19   3                              P2= table1[i];   //选择哪一位数码管点亮
  20   3                              P0 = table[i];   //赋值段码给P0口
  21   3                              Delay(2);        //延时0.02秒
  22   3                      }
  23   2              }
  24   1      }


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


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