the real solution is to have a PIC who have a internal PWM +adc module like PIC16F877 and how many other.. PIC12F683 have one PWM + ADC.
Using HPWM is the statement you need instead of PWM
OR using a pic who have only ADC an use Internal timer to generate your PWM.




Bookmarks