Why are not all the Arduino pins PWM?

I was thinking why only a few pins on the duemilanove have PWM output.
Why can’t the other pins rapidly change output?

PWM on the Arduino is done using hardware modules within the ATmega168 chip. Those modules are only available on the 6 pins the Arduino usings for PWM.

I was thinking why only a few pins on the duemilanove have PWM output.
Why can’t the other pins rapidly change output?

The Arduino PWM outputs utilize built in hardware timers on the AVR chip which limits the number of PWM outputs you can use. There is the Arduino mega board which has many more timers and therefore more PWM outputs pins avalible. What is your specific requirments?

Lefty

If I’m not mistaken, only a few have it hardwired in, but the other pins can do it via software.

Yes, there is nothing stopping you having PWM on all of the pins if you create the pulses in software.

Yeah I could pretty much create PWM with delays right?
So that would be possible on all the pins?

You can create PWM in software but it can involve a considerable amount of complexity and processing overhead. Your question can not really be answered unless you say what is it you want your project to do?

No delays are no good. You want to use interrupts. Look at the TimerOne library.

Don’t forget that the Arduino is an Atmega168 at heart. Check out the datasheet of that part on Atmels website.

The hardware PWM modules are better to use than software PWM and you might get incosistency if you use all the pins as PWM outputs, not to mention a very noisy PCB. What application do you have in mind for so many PWM outputs?