I got it going with a 4Mhz oscillator. Here is the program.
I wanetd to use the 20Mhz oscillator. and it do not work. I change the 4 to a 20 in the program and changes the crystal and the capacitor to 22pF and it is not oscillating, anybody knows why. is there a command I nee to do ?


Define LOADER_USED 1
DEFINE OSC 4 'Using 4MHz oscillator
TRISB = 0

loop: FREQOUT PORTB.1,10000,20000 ' Turn on PORTB for 1- sec at20Khz
Pause 100 ' Delay for .5 seconds

Goto loop ' Go back to loop and blink LED forever