maxim10373
Advanced Member level 4
- Joined
- Feb 26, 2010
- Messages
- 116
- Helped
- 1
- Reputation
- 2
- Reaction score
- 2
- Trophy points
- 1,298
- Activity points
- 2,066
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