PIC18F26K20 cannot set internal oscillator to high speed
Here is how I set the internal oscillator to 8 MHz on the 18F24K22:

#include &lt;p18cxxx.h&gt;
#include "timers.h"

#define USE_AND_MASKS

#pragma config FOSC = INTIO67
#pragma config WDTEN = OFF
#pragma config XINST = OFF
#pragma config MCLRE = EXTMCLR
#pragma config LVP = OFF

void main (void)
{
    // set internal oscillator to 8 MHz
    OSCCON = 0b01100010;