I am having problems using an external oscillator on a 16f648a. I can use the internal oscillator with no problem however when I try to use an external ceramic oscillator the code does not run. On the config below if I change the second line to” cfg = _XT_OSC” I have no signs of function. I am sure it is something very simple I just cannot see the problem.

#CONFIG
cfg = _INTOSC_OSC_NOCLKOUT
cfg&= _WDT_OFF
cfg&= _PWRTE_OFF
cfg&= _MCLRE_OFF
cfg&= _BODEN_OFF
cfg&= _LVP_OFF
cfg&= DATA_CP_OFF
cfg&= _CP_OFF
__CONFIG cfg
#ENDCONFIG