Without pulling out a data sheet to check, most PICs have some sort of OSCCON Register where you have to tell it to use the external crystal, oscillator, RC, or use the internal oscillator. I'm betting that by not using the OSCCON Register, it is defaulting to 4 MHz Internal Oscillator. By DEFINEing OSC 16, PBP is counting clock ticks as though you were at 16 MHz using your external resonator, where in reality, you're using the internal 4 MHz clock.
Bookmarks