From b3ba5d4f97875a68023ba3a931ffcecd1c8cf706 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 2 Oct 2010 13:38:10 -0400 Subject: [PATCH] Fixing PWM on pins 9 & 10 on the Uno. Resetting TCCR1B to 0 after it's configured by optiboot. http://code.google.com/p/arduino/issues/detail?id=364 --- hardware/arduino/cores/arduino/wiring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hardware/arduino/cores/arduino/wiring.c b/hardware/arduino/cores/arduino/wiring.c index 9cb6cf021..eb2d44001 100755 --- a/hardware/arduino/cores/arduino/wiring.c +++ b/hardware/arduino/cores/arduino/wiring.c @@ -189,6 +189,8 @@ void init() // this is better for motors as it ensures an even waveform // note, however, that fast pwm mode can achieve a frequency of up // 8 MHz (with a 16 MHz clock) at 50% duty cycle + + TCCR1B = 0; // set timer 1 prescale factor to 64 sbi(TCCR1B, CS11);