Thursday, January 30, 2014

PROGRAM FOR BLINKY USING MC 8051(MICRO-CONTROLLER)

PROGRAM FOR BLINKY USING MC 8051(MICRO-CONTROLLER)



Blinky is nothing but blinking of Led using 8051 Microcontroller.
Blinking Can be done as user defined.



























  • I have shown the toggling pattern, we can all make incrementing, Decrementing and shifting pattern.
  • Following code is for shifting pattern

[You have just change the main program:]

//--------------------------------------------------------------------------------------------------------------------------//

void main()
{
      Unsigned char count;
      Led = 0x01;   //----Initializing pin0 has high pin
While(1)   //---creating supper loop
{
If(led != 0x00)    //----Checking for a condition when not equal to 0
For(count=0;count<=7;count++)  //-----Creating 8 loop for 8 times shifting of data//
{
Led = led <<1;  //----shifting 8bit data by one bit
}
Else      //----if condition is equal to zero
{
Led = 0x01;   // load initial value to port
}
}     //---End of super loop
}
//------------------End of main program----------------//
//-------------------------------------------------------------------------------------------------------------------------------//
























This is a simple program to get started with MC 8051

For Videos :Click for video

No comments:

Post a Comment