Tried this step by step.
Commenting either or all of these:
Code:
OSCCON.1 = 0
OSCCON.0 = 1 'Use Timer1 oscillator as clock source
OSCCON.7 = 1 'Device enters in IDLE mode when sleep instruction issued
stop operation. However I'm not sure if it's because the interrupt is not triggered anymore or if that's because the CPU does not come back from sleep. I remember reading that Timer1 oscillator was always running, but looking carefully at the datasheet again I cannot find that statement back. Only mention is that SLEEP (not IDLE) mode turn off all clocks and all oscillators, expect for the WDT oscillator (if enabled).
Bookmarks