user12120: Is it possible to simultaneously output a clock signal and it's inverse using the timer register(s)? 
I'm using the following code in arduino to output a 1MHz signal on OC1A:
//Use Timer/Counter1 to generate a 1MHz square wave on Arduino pin 9.
//J.Christensen 27Apr2012

void setup(void)
{
    DDRB = _BV(DDB1);                  //set OC1A/PB1 as output (Arduino pin D9, DIP pin 15)
    TCCR1A = _BV(COM1A0);              //toggle OC1A on compare match
    OCR1A = 7;                         //top value for counter
    TCCR1B = _BV(WGM12) | _BV(CS10);   //CTC mode, prescaler clock/1
}

void loop(void)
{
}


user368: Various AVRs have the capability to output both the normal and inverted timer waveform from a single output compare register simultaneously on two pins. These devices include, but are not limited to, ATtinyX5/V, ATtiny26/L, ATtinyX61A, and ATmegaXXU4.
The ATmega328P does not have this capability, therefore the smallest primary source Arduino that does is the Leonardo (ATmega32U4) and comparable devices. The Adafruit Trinket and the Digispark (both ATtiny85-based) also offer this.

user10794: How about this?
void setup()
  {
  // Defining PB1 and PB2 as outputs by setting PORTB1 and PORTB2
  // Setting DDB1 and DDB2
  DDRB |= bit (DDB1) | bit (DDB2);

  // stop timer 1
  TCCR1A = 0;
  TCCR1B = 0;

  TCCR1A = bit (COM1B0) | bit (COM1B1)  // Set OC1B on Compare Match, clear
                                        // OC1B at BOTTOM (inverting mode)
         | bit (COM1A1)                 // Clear OC1A on Compare Match, set
                                        // OC1A at BOTTOM (non-inverting mode)
         | bit (WGM11);                 // Fast PWM, top at ICR1
  TCCR1B = bit (WGM12)  | bit (WGM13)   //       ditto
         | bit (CS11);                  // Start timer, prescaler of 8

  // Initialize OCR1A = 300 (pulse_width = 150us), OCR1B, and ICR1
  ICR1 = 0xFFFF;
  OCR1B = 299;
  OCR1A = ICR1 - OCR1B;

  }  // end of setup

void loop()
  {
  }

Results on a Uno:

Output on Uno pins 9 and 10.
Change the prescalers and counters to your desired frequency.

The screenshot doesn't show one signal exactly the inverse of the other. The pattern is inverted. If you had a 50% duty cycle, it would be an exact inverse.


It looks good except they overlap (slightly) by 50ns. If I set them to 16 and 8, respectively, they don't overlap but they are slightly asymmetrical

OK, make OCR1A and OCR1B both 7:
  ICR1 = 15;
  OCR1B = 7;
  OCR1A = 7;

Why 7? And why 15?
The counts are zero-relative. So by counting to 15 on a 16 MHz processor we are actually getting 1/16th of the clock, namely 1 MHz. And half of that is 8 (which, zero-relative, is 7). So we are really doing:

Period: 16 ticks of the 16 MHz clock
Duty cycle: 8 ticks of the 16 MHz clock


Now, one cycle:

They change over at the same instant - pulse width exactly 500 ns.

And they change back at the same moment - pulse width also 500 ns.

12120: <p>Is it possible to simultaneously output a clock signal and it's inverse using the timer register(s)? </p>

<p>I'm using the following code in arduino to output a 1MHz signal on OC1A:</p>

<pre><code>//Use Timer/Counter1 to generate a 1MHz square wave on Arduino pin 9.
//J.Christensen 27Apr2012

void setup(void)
{
    DDRB = _BV(DDB1);                  //set OC1A/PB1 as output (Arduino pin D9, DIP pin 15)
    TCCR1A = _BV(COM1A0);              //toggle OC1A on compare match
    OCR1A = 7;                         //top value for counter
    TCCR1B = _BV(WGM12) | _BV(CS10);   //CTC mode, prescaler clock/1
}

void loop(void)
{
}
</code></pre>
 368: <p>Various AVRs have the capability to output both the normal and inverted timer waveform from a single output compare register simultaneously on two pins. These devices include, but are not limited to, ATtinyX5/V, ATtiny26/L, ATtinyX61A, and ATmegaXXU4.</p>

<p>The ATmega328P does not have this capability, therefore the smallest primary source Arduino that does is the Leonardo (ATmega32U4) and comparable devices. The Adafruit Trinket and the Digispark (both ATtiny85-based) also offer this.</p>
 10794: 

<p>How about this?</p>

<pre class="lang-C++ prettyprint-override"><code>void setup()
  {
  // Defining PB1 and PB2 as outputs by setting PORTB1 and PORTB2
  // Setting DDB1 and DDB2
  DDRB |= bit (DDB1) | bit (DDB2);

  // stop timer 1
  TCCR1A = 0;
  TCCR1B = 0;

  TCCR1A = bit (COM1B0) | bit (COM1B1)  // Set OC1B on Compare Match, clear
                                        // OC1B at BOTTOM (inverting mode)
         | bit (COM1A1)                 // Clear OC1A on Compare Match, set
                                        // OC1A at BOTTOM (non-inverting mode)
         | bit (WGM11);                 // Fast PWM, top at ICR1
  TCCR1B = bit (WGM12)  | bit (WGM13)   //       ditto
         | bit (CS11);                  // Start timer, prescaler of 8

  // Initialize OCR1A = 300 (pulse_width = 150us), OCR1B, and ICR1
  ICR1 = 0xFFFF;
  OCR1B = 299;
  OCR1A = ICR1 - OCR1B;

  }  // end of setup

void loop()
  {
  }
</code></pre>

<p>Results on a Uno:</p>

<p><a href="https://i.stack.imgur.com/mc8Sk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mc8Sk.png" alt="Normal and inverted timer output"></a></p>

<p>Output on Uno pins 9 and 10.</p>

<p>Change the prescalers and counters to your desired frequency.</p>

<hr>

<p>The screenshot doesn't show one signal exactly the inverse of the other. The <em>pattern</em> is inverted. If you had a 50% duty cycle, it would be an exact inverse.</p>

<hr>

<blockquote>
  <p>It looks good except they overlap (slightly) by 50ns. If I set them to 16 and 8, respectively, they don't overlap but they are slightly asymmetrical</p>
</blockquote>

<p>OK, make OCR1A and OCR1B both 7:</p>

<pre class="lang-C++ prettyprint-override"><code>  ICR1 = 15;
  OCR1B = 7;
  OCR1A = 7;
</code></pre>

<p><em>Why 7? And why 15?</em></p>

<p>The counts are zero-relative. So by counting to 15 on a 16 MHz processor we are actually getting 1/16th of the clock, namely 1 MHz. And half of that is 8 (which, zero-relative, is 7). So we are really doing:</p>

<ul>
<li>Period: 16 ticks of the 16 MHz clock</li>
<li>Duty cycle: 8 ticks of the 16 MHz clock</li>
</ul>

<hr>

<p>Now, one cycle:</p>

<p><a href="https://i.stack.imgur.com/YefHP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YefHP.png" alt="Scope shot 1"></a></p>

<p>They change over at the same instant - pulse width exactly 500 ns.</p>

<p><a href="https://i.stack.imgur.com/dNPMd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dNPMd.png" alt="Scope shot 2"></a></p>

<p>And they change back at the same moment - pulse width also 500 ns.</p>
