aboutsummaryrefslogtreecommitdiff
path: root/cores
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2010-10-02 13:38:10 -0400
committerDavid A. Mellis <d.mellis@arduino.cc>2010-10-02 13:38:10 -0400
commit6106779cc1c91378d978fc7b8d86964d6b86a7c1 (patch)
treee73064052670b11c7d40256c81917d8bb75c5cfd /cores
parent7e23fae1a47418d5382241cc4999958d14734f11 (diff)
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
Diffstat (limited to 'cores')
-rwxr-xr-xcores/arduino/wiring.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cores/arduino/wiring.c b/cores/arduino/wiring.c
index 9cb6cf0..eb2d440 100755
--- a/cores/arduino/wiring.c
+++ b/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);