Das ist erstmal nicht so wichtig, aaaaaber statt
Code:
   PORTD ^= ( 1 << PD0 ); 
   PORTD ^= ( 1 << PD1 ); 
   PORTD ^= ( 1 << PD2 ); 
   PORTD ^= ( 1 << PD3 ); 
   PORTD ^= ( 1 << PD4 ); 
   PORTD ^= ( 1 << PD5 ); 
   PORTD ^= ( 1 << PD6 ); 
   PORTD ^= ( 1 << PD7 );
solltest du schreiben
Code:
   PORTD ^= 0xFF;