From 31c89dfd9a9a1fc3454d54a5a5df0c4fa4c0d3b3 Mon Sep 17 00:00:00 2001 From: john stone Date: Wed, 18 Jul 2012 16:12:48 +0200 Subject: [PATCH] reread datasheet.. this time awake --- firmware/main.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/firmware/main.c b/firmware/main.c index e724d3f..32755e7 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -8,17 +8,15 @@ static inline void init_pwm(void) { - // TCCR1A xx01xx10 - TCCR1A &= ~0b00100001; - TCCR1A |= 0b00000010; - - // TCCR1B xxx11001 - TCCR1B &= ~0b00000110; - TCCR1B |= 0b00011001; - //PB1 set to output: DDRB |= 0b10; - return; + OCR1B = 0xefff; //preselect some default + ICR1 = 0xffff; // TOP-wert + + TCCR1A = (1<