PWM doesn't work on pins 9 and 10 of my new Uno

For makers who have purchased an Adafruit Starter Pack, get help with the tutorials here!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
grysemonky
 
Posts: 6
Joined: Tue Dec 07, 2010 4:13 pm

PWM doesn't work on pins 9 and 10 of my new Uno

Post by grysemonky »

I just received a new Uno and PWM doesn't work on pins 9 and 10 only. PWM is working fine on all other PWM outputs. Pins 9 and 10 work fine as digital outputs. Could this be a bad board, or am I missing something?

When I use the default fade sketch with pin 9, or 10 as the PWM output I get nothing from the LED.
When I used pins 3, 5, 6 or 11 in the same sketch the LED fades as expected.

Has anybody seen this before? Any help with this would be greatly appreciated.

User avatar
westfw
 
Posts: 2006
Joined: Fri Apr 27, 2007 1:01 pm

Re: PWM doesn't work on pins 9 and 10 of my new Uno

Post by westfw »

Upgrade to 0021 instead of 0020...

The new bootloader changes some timer configuration of the timer that runs PWM on pins 20 and 21 to a state other than that assumed by the Arduino core software. 0021 provides a fix to properly initialize the timer anyway.

User avatar
grysemonky
 
Posts: 6
Joined: Tue Dec 07, 2010 4:13 pm

Re: PWM doesn't work on pins 9 and 10 of my new Uno

Post by grysemonky »

SWEET! Thank you. I'm not really sure how (spelled: I'm a noob), but that did the trick. Thank you for the quick reply. I owe you a milkshake.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Starter Pack”