Actually PWM is not Analog but Digital. if you freeze any instant in time, it's either ON, or OFF. There's no 'in-between' as with Analog. Further, you can't have PWM fall out of an Analog configured pin. Lastly, Microchip doesn't multiplex the Hardware CCP with the Analog ports anyway.

James, I think you're pretty much between a rock and a hard place on this one... you could experiment and see if...

TRISA.0=0
Loop:
Toggle PortA.0
Pause 1000
Goto Loop

would work, despite it previously being configured Analog. Put a meter on RA0 and see if it's switching On/Off. If it is, you're in business, if it's not, then....

Finally, the answer to yesterday's exception... How can I have a 'pseudo-analogue' output falling out of an otherwise configured Analogue (input) pin?

Some PICs (like the 16F628 and others), have an internal programmable Voltage Reference Module (VRef). VRef can be strapped to a physical PIC pin (RA2 on a 16F628 if my memory serves me right), and whatever voltage you program VRef to be, that's the voltage that will appear on an ANALOG configured INPUT pin. So that's how you get an ANALOG voltage, appearing on an ANALOG pin, previously configured for INPUT.

Now I said 'pseudo-Analog' because VRef has pretty coarse steps between it's Vmin and Vmax, but nevertheless it's still a lot more versatile than Digitals two states.

Melanie