#include // for the input/output register #include #include int main(void) { DDRB = 0xFF; PORTB = 0x01; while(1) { _delay_ms(400); PORTB = PORTB*2; if(PORTB == 0x40) PORTB = 0x01; } }