#include <avr/io.h>
#include <avr/delay.h>
int main()
{
DDRB = 0x28; //set PortB5 and PoertB3 to output
PINB = 0x08;
_delay_ms(1000);
while(1)
{
if(~PINB & 0x10)
{
PORTB = PORTB | 0x20;
//PORTB = 0x20;
}
else
{
PORTB = PORTB & ~0x20;
//PORTB = 0x00;
}
}
}