Two ideas to try:
1) Try OSCCON %01110000 instead of %01111000 (you do not appear to be switching from a Primary OSC - see first few paragraphs of datasheet section 4.6 and description (and foot note) of OSCCON<3>)
2) What are you doing with MCLR - is it tied high?




Bookmarks