LED effect with micro 89c51
Pretty simple LED effect with a simple code and schematic #include #define first P1 #define second P2 //sbit first P1^0 //sbit second P2^0 void wait() { int i,j; for(i=0;i for(j=0;j } main() { unsigned int i; /* Delay var */ unsigned char j,m; /* LED var */ while (1) { for(m=0x01;m!=0xff;m=m(m { for(i=1;i { /* Loop forever */ for (j=m; j!= 0x00; j P1 = j; /* Output to LED Port */ wait (); /* call wait function */ } P1=0; for (j=m; j!=0x00; j P2 = j; /* Output to LED Port */ wait (); } /* call wait function */ P2=0; } } } } schematic : Quickpost this image to Myspace, Digg, Facebook, and others!