I tried the simplest code with a blinking LED, but it is not working.

I connected the LED to PB0 through a 1k resistor. The software (AVRDUDESS) is detecting the microcontroller (ATmega16) fine, but when I run the program, the code is not working. The LED stays OFF.

The MCU was working till recently, is it possible it's damaged even though the program recognizes it?

I checked the LED and it's not damaged, so don't see a reason why it wouldn't work.

The code:

```
#include <avr/io.h>
#include <util/delay.h>

int main(void)
{
    DDRB = 0xFF; 
    while(1) 
    {
        PORTB |= (1<<PB0); //TURN LED ON
        _delay_ms(1000); 
        PORTB &= ~(1<<PB0); //Turns OFF LED
        _delay_ms(1000); 
    }

```

[![enter image description here](https://i.stack.imgur.com/nbydf.png)](https://i.stack.imgur.com/nbydf.png)