OSCSEN (oscillator system clock switch enable bit) is in configuration word 1H. You enable or disable this option at program time.
Enabled:
__CONFIG _CONFIG1H, _OSCS_ON_1H & _XT_OSC_1H
Disabled:
__CONFIG _CONFIG1H, _OSCS_OFF_1H & _XT_OSC_1H
This just enables the feature. It does not turn it on.
To use the crystal connected to Timer1 & switch from primary osc to this one, you have to set T1OSCEN & OSCCON.0 to switch to the Timer1 osc.
Bookmarks