You are on page 1of 1

#define F_CPU 12000000UL // defines the clock speed

#include <avr/io.h> // includes input/output header file


#include <util/delay.h> // includes delay header file
int main (void)
{
signed int i;
DDRB = 0xFF; //Set PORTC to all outputs
while(1)//create an infinite loop
{
for (i=0;i<300;i++)
{
PORTB=0b11111111;
_delay_ms(100); //PAUSE 1 seconds /
PORTB=0b00000000;
_delay_ms(100); //PAUSE 1 seconds
}// While Closed
for(i=0;i<300;i++)
{
PORTB=0b11111111;
_delay_ms(20); //PAUSE 1 seconds /
PORTB=0b00000000;
_delay_ms(20);
}
for(i=0;i<300;i++)
{
PORTB=0b11111111;
}}
}

You might also like