这是本人花了200元买的51开发板上的所有程序资料

源代码在线查看: 花样流水灯程序.lst

软件大小: 5293 K
上传用户: hcwlxhyq
关键词: 200 51开发板 程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				C51 COMPILER V8.02   花裚羅水灯程序                                                        05/14/2008 18:32:33 PAGE 1   
				
				
				C51 COMPILER V8.02, COMPILATION OF MODULE 花裚羅水灯程序
				OBJECT MODULE PLACED IN 花样流水灯程序.OBJ
				COMPILER INVOKED BY: C:\keil\C51\BIN\C51.EXE 花样流水灯程序.c BROWSE DEBUG OBJECTEXTEND
				
				line level    source
				
				   1          //MCU:AT89S51
				   2          //晶振:12M
				   3          #include
				   4          const unsigned char led_mod[34]={0xFE,0xFD,0xFB,0xF7,0xEF,0xDF,0xBF,0x7F,
				   5                                           0x7F,0xBF,0xDF,0xEF,0xF7,0xFB,0xFD,0xFE,
				   6                                                                           0xFE,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,0x00,
				   7                                           0xE7,0xDB,0xBD,0x7E,0x7E,0xBD,0xDB,0xE7,
				   8                                           0XAA,0X55
				   9                                                      };
				  10          
				  11          /********1ms延时子程序***********/
				  12          delay_nms(unsigned int n)
				  13          {
				  14   1       unsigned int i;
				  15   1       unsigned char j;
				  16   1      
				  17   1       for(i=0;i				  18   1          for(j=0;j				  19   1                ;     //空操作
				  20   1      }
				  21          
				  22          
				  23          
				  24          void main(void)
				  25          {
				  26   1      unsigned char a;
				  27   1      while(1)
				  28   1        {
				  29   2         for(a=0;a				  30   2           {
				  31   3                
				  32   3            P0=led_mod[a];  
				  33   3                if(a>=32)
				  34   3              delay_nms(1500);//延时1.5S
				  35   3                delay_nms(300);//延时0.3S,更改此处的值可以改变流水灯速度。
				  36   3           }
				  37   2        }
				  38   1      }
				
				
				MODULE INFORMATION:   STATIC OVERLAYABLE
				   CODE SIZE        =     59    ----
				   CONSTANT SIZE    =   ----    ----
				   XDATA SIZE       =   ----    ----
				   PDATA SIZE       =   ----    ----
				   DATA SIZE        =     34    ----
				   IDATA SIZE       =   ----    ----
				   BIT SIZE         =   ----    ----
				END OF MODULE INFORMATION.
				
				
				C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
							

相关资源