sfr P1=0x90;
void delay(unsigned int);
void main(void){unsigned char led,i;
while
(1){led=0xfe;
for(i=0;i<8;i++){P1=led;
delay
(500);
led=(led<<1)+1;}for(i=0;i<9;i++){P1=led;
delay
(500);
led=led<<1;}led=0xff;
for(i=8;i>0;i--){P1=led;
delay
(500);
led=led>>1;}for(i=0;i<5;i++){P1=led;
delay
(500);
led=(led<<2)+1;}for(i=0;i<5;i++){P1=led;
delay
(500);
c语言教程免费全套视频

1 /  5

led=(led>>2);}for(i=0;i<9;i++){P1=led;
delay
(500);
led=(led>>1)+128;}{
led=0xe7;
P1=led;
delay
(500);
led=0xc3;
P1=led;
delay
(500);
led=0x81;
P1=led;
delay
(500);
led=0x00;
P1=led;
delay
(500);}{
led=0x7e;

2 /  5

P1=led;
delay
(500);
led=0x3c;
P1=led;
delay
(500);
led=0x18;
P1=led;
delay
(500);
led=0x00;
P1=led;
delay
(500);}{
led=0xe7;
P1=led;
delay
(500);
led=0xdb;
P1=led;

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。