2014-03-08 12:48 AM
2014-03-08 06:29 AM
That's a bit of a mess, I can't see the ADC stuff working at all, the pins aren't set up properly, and the channels are wrong.
For the PWM, could it be excessive loading on the pins? Have you tried observing the pins with no loads? Can you illustrate the wave forms you are seeing?