// ******************************** PWM ********************************************************** DDRB = ( 1 << PB1 ); // Setzen des OC1A (PB1) als Ausgang // Auszug aus dem Datenblatt // COM1A1/COM1B1 COM1A0/COM1B0 Description // 0 0 Normal port operation, OC1A/OC1B disconnected. // 0 1 WGM13:0 = 9 or 14: Toggle OC1A on Compare Match, OC1B // disconnected (normal port operation). For all other WGM1 // settings, normal port operation, OC1A/OC1B disconnected. // 1 0 Clear OC1A/OC1B on Compare Match when up-counting. Set // OC1A/OC1B on Compare Match when downcounting. // 1 1 Set OC1A/OC1B on Compare Match when up-counting. Clear // OC1A/OC1B on Compare Match when downcounting. // Mode WGM13 WGM12 WGM11 WGM10 Timer/Counter Mode of TOP Update of // (CTC1) (PWM11) (PWM10) Operation OCR1x // 0 0 0 0 0 Normal 0xFFFF Immediate // 1 0 0 0 1 PWM, Phase Correct, 8-bit 0x00FF TOP // 2 0 0 1 0 PWM, Phase Correct, 9-bit 0x01FF TOP // 3 0 0 1 1 PWM, Phase Correct, 10-bit 0x03FF TOP // CS12 CS11 CS10 Description // 0 0 0 No clock source. (Timer/Counter stopped) // 0 0 1 clkI/O/1 (No prescaling) // 0 1 0 clkI/O/8 (From prescaler) // 0 1 1 clkI/O/64 (From prescaler) // 1 0 0 clkI/O/256 (From prescaler) // 1 0 1 clkI/O/1024 (From prescaler) // 1 1 0 External clock source on T1 pin. Clock on falling edge. // 1 1 1 External clock source on T1 pin. Clock on rising edge. TCCR1A = (1<