Some digital out's wont pwm properly

So I have a loop that does digital out pwm from 1 - 255 then 255 back to 1.

Well I noticed some digital out pins work and some don't.. what I mean is some out's will fade properly but others just go ON or OFF.

So the LED will turn on and then turn OFF instead of fading- is this a known issue or am I doing something wrong?

Thanks in advanced!

The mega168 only has six hardware PWM outputs. If you want to PWM a non-hardware PWM pin, you need to do it in software.

  • Ben

Okay that makes sense, could you direct me to which pins on the arduino are the pwm pins?

If your board has an atmega168: PWM: 3, 5, 6, 9, 10, 11 http://www.arduino.cc/en/Hacking/PinMapping168 or http://www.arduino.cc/en/Main/ArduinoBoardDiecimila

If it has an atmega8: PWM: 9, 10, 11 http://www.arduino.cc/en/Hacking/PinMapping or http://www.arduino.cc/en/uploads/Main/ArduinoSeverinoMountingDiagram.png

Okay that makes sense, could you direct me to which pins on the arduino are the pwm pins?

... the pins that have "PWM" sikscreened on the board are the ones that do PWM. :