Buzzer not working with delay avr atmega162
You can't do delay_ms(1000) with F_CPU so high,

the manual says the most you can get at 12MHz is a little under 22ms

Perhaps do this instead of _delay_ms(1000)

for(int x=0;x&lt;50;++x) _delay_ms(20);