From e854e40974a3f32ae61dabdd9bd5da43ee42e900 Mon Sep 17 00:00:00 2001 From: bigalex Date: Mon, 6 Aug 2012 00:19:47 +0200 Subject: [PATCH] base frequency of pwm lowered --- firmware/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/main.c b/firmware/main.c index b2b0c68..c01582c 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -31,7 +31,7 @@ static synth_t synth; uint8_t counter = 0; uint8_t pulsewidth = 0; -uint8_t maxcounter = 0xFF; +uint16_t maxcounter = 0xFF; uint16_t pulsecounter = 0; static void synth_init(void) @@ -75,7 +75,7 @@ static inline void init_pwm(void) //PB2 set to output: DDRB |= (1 << PORTB2); OCR1B = 0x001F; //preselect some default - ICR1 = 0x003F; // TOP-wert + ICR1 = 0x00FF; // TOP-wert TCCR1A = (1 << COM1B1) | (1 << WGM11); // only b-chan , fastpwm (mode 14) TCCR1B = (1 << WGM13) | (1 << WGM12) | (1 << CS10); //Fastpwm, no prescale