C51 COMPILER V9.01   LED                                                                   12/07/2014 21:12:07 PAGE 1   


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

line level    source

   1          
   2          
   3          #include <reg51.h> 
   4          
   5          void delay(unsigned int i);      //函数声名
   6           
   7          // 此表为 LED 的字模              0              1     2     3     4     5     6     7    8     9          a     b     c    
             -d     e      f
   8          unsigned char code LED7Code[] = {~0x3F,~0x06,~0x5B,~0x4F,~0x66,~0x6D,~0x7D,~0x07,~0x7F,~0x6F,~0x77,~0x7C,~
             -0x39,~0x5E,~0x79,~0x71};
   9           
  10          main()
  11          {  
  12   1        unsigned int LedNumVal ;  //定义变量
  13   1         
  14   1        while(1)
  15   1        {      
  16   2                 // 将字模送到P0口显示
  17   2                  LedNumVal++;         
  18   2                      P0 = LED7Code[LedNumVal%16]&0x7f;     //LED7 0x7f为小数点 共阴和共阳此处也是不一样;
  19   2                      delay(60000);     //调用延时程序
  20   2      
  21   2        }   
  22   1      }
  23                  
  24          /*****************************************************************
  25          *                                                                                                                                *
  26          *             延时程序                                                                                   *
  27          *                                                                                                                                *
  28          *****************************************************************/
  29          void delay(unsigned int i)
  30          {
  31   1          char j;
  32   1          for(i; i > 0; i--)     //循环6000*200次
  33   1              for(j = 200; j > 0; j--);
  34   1      }
  35          


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


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