jak w temacie, próbuje coś prostego napisać i nic z tego nie wychodzi, dioda nie swieci.
#include<avr/io.h>
#include<util/delay.h>
#include <avr/interrupt.h>
#include <stdint.h>
#define LED1 (1<<PB2)
int main( void ){
DDRB = LED1;
PORTB = LED1;
TCCR1A |=(1<<WGM11);
TCCR1B |=(1<<WGM12); //Fast Pwm
TCCR1A |= (1<<COM1B1);
TCCR1B |= (1<<CS12)|(1<<CS11)|(1<<CS10);
ICR1 = 18; //~50hz
while(1){
//PORTB ^=LED1;
_delay_ms(2000);
OCR1B=10;
_delay_ms(2000);
OCR1B=50;
_delay_ms(2000);
OCR1B=100;
_delay_ms(2000);
OCR1B=150;
_delay_ms(2000);
OCR1B=200;
_delay_ms(2000);
OCR1B=225;
_delay_ms(4000);
OCR1B=255;
}
}