1 2 3 4 5 6 7 8 9 10 11 12 13
void pwminit() { TCCR0 |= (1<<WGM01); } void pwm_setInterval() { /// if(t_current.ms <= 500) /// { OCR1A = 50 + (200 - (t_current.ms / 3)); } /// else /// { OCR1A = 50 + (200 - ((1000 - t_current.ms) / 3)); } }