|
|
|
|
@ -19,9 +19,9 @@ void timer_init_tiny26(void)
|
|
|
|
|
|
|
|
|
|
/* output pin: OC1A = PB1 = 1 or OC1B = PB3 = 2 */
|
|
|
|
|
OCR1A = 0;
|
|
|
|
|
TCCR1A = (1 << COM1A1) | (1 << PWM1A);/* pwm enable, not inverted */
|
|
|
|
|
TCCR1A = (1 << COM1B1) | (1 << PWM1B);/* pwm enable, not inverted */
|
|
|
|
|
TCCR1B = (1 << CS10);/* fast pwm, no prescaler */
|
|
|
|
|
DDRB |= (1 << PB1);
|
|
|
|
|
DDRB |= (1 << PB3);
|
|
|
|
|
|
|
|
|
|
TIMSK = 1 << TOIE1;/* interrupt on overflow */
|
|
|
|
|
}
|
|
|
|
|
|