Home > other >  2468 lights flashing
2468 lights flashing

Time:10-11

#include
Typedef unsigned char u8;
Typedef unsigned int under-16;
Sbit led2=P2 ^ 1;
Sbit led4=P2 ^ 3;
Sbit led6=P2 ^ 5;
Sbit led8=P2 ^ 7;

Void delay (under-16 I)
{
While (I -);

}
Void main ()
{
While (1)
{
Led2=0;
Led4=0;
Led6=0;
Led8=0;
Delay (50000);
Led2=1;
Led4=1;
Led6=1;
Led8=1;
Delay (50000);
}
}

CodePudding user response:

What's the problem? !

CodePudding user response:

What's the problem? ! The code can be optimized.

CodePudding user response:

I thought it was 2 k a lamp
  • Related