#include <avr/io.h>
#include <util/delay.h>
 
int main (void)
{
  DDRB |= (1<<PB2); //setting pin 2 of port b as output.
 
while(1)
  {
 
 PORTB |= (1<<PB2); //setting the pin PB2 high
        _delay_ms(50); //1000ms delay
 PORTB &= ~(1<<PB2); // setting the pin PB2 LOW
_delay_ms(50);
 
  }
 
}