From c4ab80eff676edbc1fd16727f79c17ec5f337d32 Mon Sep 17 00:00:00 2001 From: "Jan \"Yenya\" Kasprzak" Date: Fri, 30 Nov 2012 02:22:58 +0100 Subject: [PATCH] make timer faster, sub-1 LSB PWM values need it otherwise, the step-up blinks with low pwm settings --- firmware/tmr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/tmr.c b/firmware/tmr.c index 9a0a38b..37b240b 100644 --- a/firmware/tmr.c +++ b/firmware/tmr.c @@ -4,14 +4,14 @@ #include "lights.h" volatile uint16_t jiffies; -#define PATTERN_DIV 5 // clk/10 +#define PATTERN_DIV 10 // clk/10 static unsigned char pattern_div; void init_tmr() { TCCR0A = _BV(WGM00); TCCR0B = _BV(CS02) | _BV(CS00); // CLK/1024 = 1 kHz - OCR0A = 10; // 100 Hz + OCR0A = 5; // 200 Hz TIMSK |= _BV(OCIE0A); jiffies = 0; -- 2.39.3