// Preamble
#include <avr/io.h>
#include <util/delay.h> /* Time delay function */
// Function definitions
#define LED_DDR DDRB
#define LED_PORT PORTB
//main function
int main(void)
{
// Initialization
LED_DDR = 0b00000001; // Set the first pin of Port B as output
// Event loop
while(1) {
LED_PORT = 0b00000001; // Turn on first pin in Port B
_delay_ms(500); // Wait 500 ms
LED_PORT = 0b00000000; // Turn off first pin in Port B
_delay_ms(500); // Wait 500 ms
}
return(0); // This line is never reached
}