Problems creating 10Hz pulse wave
You have your whole 100ms wait time while the pin is low.
You need half of it while low, half while high.

while(1){

    PORTB &amp;= ~(1&lt;&lt;PORTB1);
    _delay_ms(50);
    PORTB |= (1&lt;&lt;PORTB1);
    _delay_ms(50); // You need a delay here too.
}