2 Möglichkeiten ?:
Code:
 while (1) 
   {   if (!(PINB & (1<<1))) 
      {   PORTC|=(1<<PC5); 
          
      } 
      else 
      {    
         PORTC&=~(1<<5); 
      }    
       
   }
oder
Code:
 while (1) 
   {   if(PINB & (1<<1)) 
      {   
         PORTC&=~(1<<5);  
      } 
      else 
      {  
           PORTC|=(1<<PC5);  
            }    
       
   }