|
楼主 |
发表于 2020-12-26 04:25:03
|
显示全部楼层
我传个最简单的给你
#include<reg52.h>//头文件
#define uchar unsigned char//宏定义
#define uint unsigned int//宏定义
void delay ( uint a)
{
while (a --);//while延时可以对不同的位定不同的延时值
}
void main( )
{
while(1)
{
P1=0xfe;//01
delay( 50000);//1
delay( 50000);//2
delay( 50000);//3
delay( 50000);//4
delay( 50000);//5
delay( 50000);//6
delay( 50000);//7
delay( 50000);//8
delay( 50000);//9
delay( 50000);//10
P1=0xfd;//02
delay(50000 );//1
delay( 50000);//2
delay( 50000);//3
delay( 50000);//4
delay( 50000);//5
delay( 50000);//6
delay( 50000);//7
delay( 50000);//8
delay( 50000);//9
delay( 50000);//10
delay( 50000);//11
delay( 50000);//12
delay( 50000);//13
delay( 50000);//14
delay( 50000);//15
delay( 50000);//16
delay( 50000);//17
delay( 50000);//18
delay(50000 );//19
delay( 50000);//20
delay( 50000);//21
delay( 50000);//22
delay( 50000);//23
delay( 50000);//24
delay( 50000);//25
delay(50000 );//26
delay( 50000);//27
delay( 50000);//28
delay( 50000);//29
delay( 50000);//30
delay( 50000);//31
delay( 50000);//32
delay( 50000);//33
delay( 50000);//34
delay( 50000);//35
delay( 50000);//36
delay( 50000);//37
delay( 50000);//38
delay( 50000);//39
delay( 50000);//40
delay( 50000);//41
delay( 50000);//42
delay( 50000);//43
delay(50000 );//44
delay( 50000);//45
delay( 50000);//46
delay( 50000);//47
delay( 50000);//48
delay( 50000);//49
delay( 50000);//50
delay(50000 );//51
delay( 50000);//52
delay( 50000);//53
delay( 50000);//54
delay( 50000);//55
delay( 50000);//56
delay( 50000);//57
delay( 50000);//58
delay( 50000);//59
delay( 50000);//60
delay( 50000);//61
delay( 50000);//62
delay( 50000);//63
delay( 50000);//64
delay( 50000);//65
delay( 50000);//66
delay( 50000);//67
delay( 50000);//68
delay(50000 );//69
delay( 50000);//70
delay( 50000);//71
delay( 50000);//72
delay( 50000);//73
delay( 50000);//74
delay( 50000);//75
delay(50000 );//76
delay( 50000);//77
delay( 50000);//78
delay( 50000);//79
delay( 50000);//80
delay( 50000);//81
delay( 50000);//82
delay( 50000);//83
delay( 50000);//84
delay( 50000);//85
delay( 50000);//86
delay( 50000);//87
delay( 50000);//88
delay( 50000);//89
delay( 50000);//90
delay( 50000);//91
delay( 50000);//92
delay( 50000);//93
delay(50000 );//94
delay( 50000);//95
delay( 50000);//96
delay( 50000);//97
delay( 50000);//98
delay( 50000);//99
delay( 50000);//100
delay(50000 );//1
delay( 50000);//2
delay( 50000);//3
delay( 50000);//4
delay( 50000);//5
delay( 50000);//6
delay( 50000);//7
delay( 50000);//8
delay( 50000);//9
delay( 50000);//10
delay( 50000);//11
delay( 50000);//12
delay( 50000);//13
delay( 50000);//14
delay( 50000);//15
delay( 50000);//16
delay( 50000);//17
delay( 50000);//18
delay(50000 );//19
delay( 50000);//20
delay( 50000);//21
delay( 50000);//22
delay( 50000);//23
delay( 50000);//24
delay( 50000);//25
delay(50000 );//26
delay( 50000);//27
delay( 50000);//28
delay( 50000);//29
delay( 50000);//30
delay( 50000);//31
delay( 50000);//32
delay( 50000);//33
delay( 50000);//34
delay( 50000);//35
delay( 50000);//36
delay( 50000);//37
delay( 50000);//38
delay( 50000);//39
delay( 50000);//40
delay( 50000);//41
delay( 50000);//42
delay( 50000);//43
delay(50000 );//44
delay( 50000);//45
delay( 50000);//46
delay( 50000);//47
delay( 50000);//48
delay( 50000);//49
delay( 50000);//50
delay(50000 );//51
delay( 50000);//52
delay( 50000);//53
delay( 50000);//54
delay( 50000);//55
delay( 50000);//56
delay( 50000);//57
delay( 50000);//58
delay( 50000);//59
delay( 50000);//60
delay( 50000);//61
delay( 50000);//62
delay( 50000);//63
delay( 50000);//64
delay( 50000);//65
delay( 50000);//66
delay( 50000);//67
delay( 50000);//68
delay(50000 );//69
delay( 50000);//70
delay( 50000);//71
delay( 50000);//72
delay( 50000);//73
delay( 50000);//74
delay( 50000);//75
delay(50000 );//76
delay( 50000);//77
delay( 50000);//78
delay( 50000);//79
delay( 50000);//80
delay( 50000);//81
delay( 50000);//82
delay( 50000);//83
delay( 50000);//84
delay( 50000);//85
delay( 50000);//86
delay( 50000);//87
delay( 50000);//88
delay( 50000);//89
delay( 50000);//90
delay( 50000);//91
delay( 50000);//92
delay( 50000);//93
delay(50000 );//94
delay( 50000);//95
delay( 50000);//96
delay( 50000);//97
delay( 50000);//98
delay( 50000);//99
delay( 50000);//100
P1=0xfb;//03
delay(50000 );//1
delay( 50000);//2
delay( 50000);//3
delay( 50000);//4
delay( 50000);//5
delay( 50000);//6
P1=0xf7;//04
delay(50000 );//1
delay( 50000);//2
delay( 50000);//3
delay( 50000);//4
delay( 50000);//5
delay( 50000);//6
delay( 50000);//7
delay( 50000);//8
delay( 50000);//9
delay( 50000);//10
delay( 50000);//11
delay( 50000);//12
delay( 50000);//13
delay( 50000);//14
delay( 50000);//15
delay( 50000);//16
delay( 50000);//17
delay( 50000);//18
delay(50000 );//19
delay( 50000);//20
delay( 50000);//21
delay( 50000);//22
delay( 50000);//23
delay( 50000);//24
delay( 50000);//25
delay(50000 );//26
delay( 50000);//27
delay( 50000);//28
delay( 50000);//29
delay( 50000);//30
delay( 50000);//31
delay( 50000);//32
delay( 50000);//33
delay( 50000);//34
delay( 50000);//35
delay( 50000);//36
delay( 50000);//37
delay( 50000);//38
delay( 50000);//39
delay( 50000);//40
delay( 50000);//41
delay( 50000);//42
delay( 50000);//43
delay(50000 );//44
delay( 50000);//45
delay( 50000);//46
delay( 50000);//47
delay( 50000);//48
delay( 50000);//49
delay( 50000);//50
delay(50000 );//51
delay( 50000);//52
delay( 50000);//53
delay( 50000);//54
delay( 50000);//55
delay( 50000);//56
delay( 50000);//57
delay( 50000);//58
delay( 50000);//59
delay( 50000);//60
delay( 50000);//61
delay( 50000);//62
delay( 50000);//63
delay( 50000);//64
delay( 50000);//65
delay( 50000);//66
delay( 50000);//67
delay( 50000);//68
delay(50000 );//69
delay( 50000);//70
delay( 50000);//71
delay( 50000);//72
delay( 50000);//73
delay( 50000);//74
delay( 50000);//75
delay(50000 );//76
delay( 50000);//77
delay( 50000);//78
delay( 50000);//79
delay( 50000);//80
delay( 50000);//81
delay( 50000);//82
delay( 50000);//83
delay( 50000);//84
delay( 50000);//85
delay( 50000);//86
delay( 50000);//87
delay( 50000);//88
delay( 50000);//89
delay( 50000);//90
delay( 50000);//91
delay( 50000);//92
delay( 50000);//93
delay(50000 );//94
delay( 50000);//95
delay( 50000);//96
delay( 50000);//97
delay( 50000);//98
delay( 50000);//99
delay( 50000);//100
delay(50000 );//1
delay( 50000);//2
delay( 50000);//3
delay( 50000);//4
delay( 50000);//5
delay( 50000);//6
delay( 50000);//7
delay( 50000);//8
delay( 50000);//9
delay( 50000);//10
delay( 50000);//11
delay( 50000);//12
delay( 50000);//13
delay( 50000);//14
delay( 50000);//15
delay( 50000);//16
delay( 50000);//17
delay( 50000);//18
delay(50000 );//19
delay( 50000);//20
delay( 50000);//21
delay( 50000);//22
delay( 50000);//23
delay( 50000);//24
delay( 50000);//25
delay(50000 );//26
delay( 50000);//27
delay( 50000);//28
delay( 50000);//29
delay( 50000);//30
delay( 50000);//31
delay( 50000);//32
delay( 50000);//33
delay( 50000);//34
delay( 50000);//35
delay( 50000);//36
delay( 50000);//37
delay( 50000);//38
delay( 50000);//39
delay( 50000);//40
delay( 50000);//41
delay( 50000);//42
delay( 50000);//43
delay(50000 );//44
delay( 50000);//45
delay( 50000);//46
delay( 50000);//47
delay( 50000);//48
delay( 50000);//49
delay( 50000);//50
delay(50000 );//51
delay( 50000);//52
delay( 50000);//53
delay( 50000);//54
delay( 50000);//55
delay( 50000);//56
delay( 50000);//57
delay( 50000);//58
delay( 50000);//59
delay( 50000);//60
delay( 50000);//61
delay( 50000);//62
delay( 50000);//63
delay( 50000);//64
delay( 50000);//65
delay( 50000);//66
delay( 50000);//67
delay( 50000);//68
delay(50000 );//69
delay( 50000);//70
delay( 50000);//71
delay( 50000);//72
delay( 50000);//73
delay( 50000);//74
delay( 50000);//75
delay(50000 );//76
delay( 50000);//77
delay( 50000);//78
delay( 50000);//79
delay( 50000);//80
delay( 50000);//81
delay( 50000);//82
delay( 50000);//83
delay( 50000);//84
delay( 50000);//85
delay( 50000);//86
delay( 50000);//87
delay( 50000);//88
delay( 50000);//89
delay( 50000);//90
delay( 50000);//91
delay( 50000);//92
delay( 50000);//93
delay(50000 );//94
delay( 50000);//95
delay( 50000);//96
delay( 50000);//97
delay( 50000);//98
delay( 50000);//99
delay( 50000);//100
}
} |
|