Maybe I am misunderstanding.
Analog front end.
The pot is connected between the ground and 5+ with the wiper going to the ADC input.
The PWM output goes to the mosfet gate.
The pot is not connected to the 10 volt. Use the same power supply as the PIC. The 10 V will only connect to the drain or source of the mosfet. NPN or PNP, what ever you use.





Bookmarks