title: Writing bits to a port in C
body: <p>Using atmel studio to write some beginner C for an atmega64 micro controller. To start off I wanted to read values from PINA, one's complement the values, write them out on PORTC.</p>
  
  <p>Started off with </p>
  
  <pre><code>#include &lt;avr/io.h&gt;
  int main(void)
  {
  
  DDRA = 0x00; //set PORTA to inputs
  DDRC = 0xFF; //set PORTC to outputs
  while(1)
  {
      ~PINA; // one's  values of PORT A
  
  
  
  
  }
  return 0;
  }
  </code></pre>
  
  <p>Not so sure how to write the value out to PORTC,</p>
  
  <p>Can anyone guide me where to go from here?</p>
  
  <p>Cheers james</p>