diff --git a/firmware/main.c b/firmware/main.c index 8b78f18..4abefea 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -6,6 +6,24 @@ #include "main.h" + +void init_pwm(void){ + + // TCCR1A xx01xx10 + TCCR1A &= ~0b00100001; + TCCR1A |= 0b00000010; + + // TCCR1B xxx11001 + TCCR1B &= ~0b00000110; + TCCR1B |= 0b00011001; + + //PB1 set to output: + DDRB |= 0b10; + + +} + + int main (void) { @@ -22,17 +40,29 @@ int main (void) //reduce power PRR |= (1<