Hello.
You need to use external oscillator on OSC1 and 2, or add this line to your code:
@ __CONFIG _CONFIG1H, _OSC_INTIO67_1H
This instruction configure your pic with the internal oscillator.
Change DEFINE OSC 20 to DEFINE OSC 8.
If you want to use internal osc to 20Mhz you need to use the PLL.
Bookmarks