Ich hab dein Programm kopiert und bei mir eingefügt. Hab auch bisschen an den klammern rumgebastelt.
Man kann klammern weglassen, wenn nur eine Anweisung folgt, oder?

Hier nochmal der ganze Code von mir:
Code:
#include <avr/io.h>
#include <stdint.h>
#include <util/delay.h>
#define F_CPU 1000000UL

int main (void)
{
uint8_t i;
uint8_t flanke;
          
DDRA  = 0xff;
DDRD  &= ~(1<<DDD0);
   
  while(1) 
  {
  if (PIND & (1<<PD0)) 
    {
    if (!flanke)
      {
      flanke = 1;
      PORTA |= (1<<PA1);
      for (i=1; i<=100; i=i+1)
        {
        _delay_ms(10);
        }
      PORTA |= (1<<PA0);
      }
    }
    else
      {
      flanke = 0;
      PORTA &= ~(1<<PA0);
      PORTA &= ~(1<<PA1);
      }
  }

}
Weiß echt nich weiter.
Man bräuchte einen Debugger um das alles mal schritt für schritt durchzuspielen.
Naja, N8.