Not sure if this is relevant or not, but in the thread I started on using a PIC as the basis of a model train controller ( http://www.picbasic.co.uk/forum/showthread.php?t=5687 ) I needed to control four independant trains via for pots using PWM.
This used Darrel's excellent PWM routines and with an 16F676 running at 20 Mhz performed very well. This used 4 x AD convertors and used the value to adjust the PWM, and I'm sure with a simple bit of modification it would do what you want
Also have a look at this thread http://www.picbasic.co.uk/forum/showthread.php?t=3251
Bookmarks