If you're using the internal oscillator, you must add this line at the top of your code
OSCCON = $70 'use 8MHZ
OR
OSCCON = $60 ' use internal 4MHZ
in case you don't set this register, you'll run @32khz... at this speed. i'm not sure PWM will work as you want
also be sure your RA.3 is correctly tie to vcc if you didn't set the MCLR OFF fuse.
Bookmarks