Pin 9 and 10 with different duty cycles I want to control the contrast and backlight of an HD44780 LCD display with two PWM signals. I would like to use PB1 and PB2 (Pin 9 and Pin 10) for this. 
As far as my research goes, timer1 is responsible for the two pins.
OCR1A and OCR1B are responsible for the pulse length.

With the code below I get a frequency of 7.823 kHz and a duty cycle of 88%. But it works only on PB1. PB2 is still constant 0V. I am using the AtmelStudio, therefore I don't have access to functions like pinMode(10, Output) 

How can I have different duty cycles on pin 9 and 10?

#define F_CPU 16000000UL
#include &lt;avr/io.h&gt;

int main(void)
{
    DDRB |= (1 &lt;&lt; DDB1) | (1 &lt;&lt; DDB2);
    OCR1A = 900;
    OCR1B = 400;
    TCCR1A |= (1 &lt;&lt; COM1A1);
    TCCR1A |= (1 &lt;&lt; WGM11) | (1 &lt;&lt; WGM10);
    TCCR1B = (TCCR1B &amp; 0b11111000) | (1 &lt;&lt; CS10);

}
After trying  a lot of things i got it working.
And even the contrast is working directly on the pwm signal.

#define F_CPU 16000000UL
#include &lt;avr/io.h&gt;
void main(void){
    DDRB = 0x06;
    OCR1A = 200; //Duty cycle for PB1 ~80%
    OCR1B = 100; //Duty cycle for PB2 ~40%
    TCCR1A = 0; //Set TCCR1A to zero. We will configure it manually
    TCCR1A |= (1 &lt;&lt; COM1A1) | (0 &lt;&lt; COM1A0) | ( 0 &lt;&lt; COM1B0) | (1 &lt;&lt; COM1B1);
    TCCR1A |= (0 &lt;&lt; WGM12) | (0 &lt;&lt; WGM11) | (1 &lt;&lt; WGM10); 
    TCCR1B = 0; //Set TCCR1B to zero. We will configure it manually
    TCCR1B |= (0 &lt;&lt; CS12) | (0 &lt;&lt; CS11) | (1 &lt;&lt; CS10);
    while(1){

    }
}