Page 1 of 1

PWM Output on Arduino mega 2560

Posted: Mon Feb 04, 2013 5:51 pm
by trisbillers
Hi, All,

I am struggling to get my PWM outputs to work.

I can get a pwm output on Digital Pin 4 (PWM 2).
But when I tire and get any of others to work I am unable to see a pwm output.
I have tried all different PWM channels/ pins and as you can see with the program attached I should be getting the PWM on both Digital Pin 4 and pin 2,

But i am only seeing the pwm on pin4.


I have tried different pins/PWM channels and the only one I can get to work is PWM channel 2 on Digital pin 4.

Could anyone Help?

Thanks

Tristan

Re: PWM Output on Arduino mega 2560

Posted: Mon Feb 04, 2013 10:16 pm
by dazz
Hi
I've attached a flowchart that will switch fade an led via pwm ,all channels are set to work at the same time, so connect a bunch of led's to the arduino pwms and all should work

Regards
Dazz
PWMTEST all channels.fcf_avr
(35.05 KiB) Downloaded 325 times

Re: PWM Output on Arduino mega 2560

Posted: Tue Feb 05, 2013 10:00 am
by trisbillers
HI, Dazz,

Thanks for the replie,
I have tested your program on 3 diffrent boards, and the only pins that are giving me a PWM output are digital pins, 4, 9, 10, 11, 12, & 13,

Any idears?

Thanks

Tristan