Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
void main()
{
unsigned int flag = 0;
while(1)
{
if(Button_pressed) // check for button is pressed
{
flag++; // increment a variable
if(flag > 2)
{
flag = 1;
}
}
if(flag == 1)
{
LED1 = HIGH;
LED3 = HIGH;
LED2 = LOW;
LED4 = LOW;
}
else if(flag == 2)
{
LED1 = LOW;
LED3 = LOW;
LED2 = HIGH;
LED4 = HIGH;
}
}
}
Sir
Can I use Keil mcs 51 ?
Thanks a lot
Ajitkumar
- - - Updated - - -
Dear sir,
please give me .hex file if possible
its very urgent .
Regards
Ajitkumar
As same working.Both LEDs are ON