SparkFun Forums 

Where electronics enthusiasts find answers.

Your source for all things Atmel.
By equipoise
Can I use analogWrite() PWM simultaneously on multiple pins without any timing problems? If there are timing issues, does their badness depend on the number of different PWM channels I use? The duty cycles on each pin will be different from each other. And if it's not possible to do this without timing badness, I'm interested in any suggestions about alternatives you might have.

I'm interested in learning about this behavior for both the Duemilanove (6 PWM channels) and the Mega (13 PWM channels).


-- equipoise
By Liencouer
I would guess (although I have not dug too deeply) that analog write sets up a timer with a constant frequency and then varies the duty cycle for each pin by comparing the desired value vs the count register. as such, i suspect you can use the analog writes as if they were independent of each other.
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]