What jumps out for me is you say you are using a 16 MHz external oscillator, yet in your CONFIG statement you list:
Code:
_FEXTOSC_OFF & _RSTOSC_HFINT32
Your CONFIG should have _FEXTOSC_EHC & _RSTOSC_EXT1X.
Also, since you didn't post the rest of your code, I am taking a guess here. The 16F15345 has an SFR called OSCEN that allows you to turn ON different oscillators. Bit 7 enables your EXTernal OSCillator (EXTOSC), bit 6 enables your HFINTOSC you are using for your Watch Dog Timer (_WDTCCS_HFINTOSC in your CONFIG3).
In my experience, the Compiler will generate totally non-related Errors at times. I would start here.
Bookmarks