#define PWM_PIN (PB5)
#define PRESCALER (64)
#define FREQ_HZ (1000UL)
#define TOP_VALUE (F_CPU/(FREQ_HZ * PRESCALER))
void initTimer1(){
TCCR1A = TCCR1B = 0;
TCNT1 = 0x000;
ICR1 = (uint16_t)(TOP_VALUE-1);
OCR1A = (uint16_t)(TOP_VALUE/4);
TCCR1A |= (1<<COM1A1) | (1<<WGM11);
TCCR1B |= (1<<WGM13) | (1<<WGM12) | (1<<CS11) | (1<<CS10);
}
void setup() {
DDRB |= (1 << PWM_PIN);
initTimer1();
}
void loop() {
}