Hi Scorp,
Place disable before your interrupt sub-routine label, and place resume before
enable at the end. Resume inserts retfie. Enable tells PBP to start inserting
code to continue testing for the interrupt condition again. If you reverse the
two, you're jumping out of the interrupt service routine to test for the
interrupt condition you're already servicing.
If you're using ADCIN, you don't need to mess with ADCON0. PBP handles this
one for you automatically. TRIS, ADCON1, (ANSEL where applicable) must
already be setup before using ADCIN, so make sure you set whatever A/D
input pin you're using up as an input first.
Bookmarks