Quote Originally Posted by penelopepug View Post
...and another on the pot's wiper.
Remove the cap.

Quote Originally Posted by penelopepug View Post
...I get a syntax error on the line "CMCON0 = 7" which disables the comparators. Yes, I tried "0" and "O" and just "CMCON".
Select the correct PIC model from the drop down menu in MicroCode Studio.

Quote Originally Posted by penelopepug View Post
...
INTCON = %10001000 'internal oscillator
OSCCON = %01110000 '8mHz
Add, DEFINE OSC 8.

Quote Originally Posted by penelopepug View Post
...
Define CCP1_REG GPIO 'PWM Output on gpio
Define CCP1_BIT 2 'Bit 2
Not sure why you used these?