Saturday, August 21, 2010

I need a program in c language to control 8 LED's so that they can ligths by two LED's at a time then shifted

Hmmm, not much to go on.





unsigned char Lights;





Lights = 0x03;


do


{


//write Lights out to your LED'S


//have some delay;


Lights %26lt;%26lt;= 1; rotate 1 bit


if (Lights == 0x80)


Lights = 0x81;


else if (Lights == 0x02)


Lights = 0x03;


}


while(1);
  • make up
  • No comments:

    Post a Comment