--- a/firmware/main.c Fri May 12 15:33:22 2017 +0200 +++ b/firmware/main.c Fri May 12 15:43:43 2017 +0200 @@ -51,7 +51,7 @@ TCCR1A = (1<<WGM10)|(1<<COM1A1) // Set up the two Control registers of Timer1. |(1<<COM1B1); // Wave Form Generation is Fast PWM 8 Bit, TCCR1B = (1<<WGM12) // OC1A and OC1B are cleared on compare match - |(1<<CS10); // and set at BOTTOM. Clock Prescaler is 1024. + |(1<<CS11); // and set at BOTTOM. Clock Prescaler is 1024. uint8_t i; @@ -74,13 +74,13 @@ switch (mode) { case 1: - OCR1A = 63; // Dutycycle of OC1A = 25% + OCR1A = 40; // Dutycycle of OC1A = 25% break; case 2: - OCR1A = 127; // Dutycycle of OC1A = 50% + OCR1A = 110; // Dutycycle of OC1A = 50% break; case 3: - OCR1A = 189; // Dutycycle of OC1A = 75% + OCR1A = 160; // Dutycycle of OC1A = 75% break; case 4: OCR1A = 255; // Dutycycle of OC1A = 100% @@ -111,7 +111,7 @@ if (mode < 4) { mode++; } else { - mode = 1; + mode = 0; } led(mode); pwm_update();