working with a PICF1615324 and using the internal comparitor. I think I have this part working.

There is an option to trigger an interupt when the comparitor changes state.
How would i go about this in FC, use the custom Interrupt I guess...
I'm not looking for help on this chips specific interrupt but what in general I should be doing to get a custom interupt to work.
Enable Code. Set the required register bits for correct operation of the interupt. Such as...
Code: Select all
st_bit(CM1CON0,C1ON);
st_bit(CM1CON0,C1POL);
st_bit(CM1CON1,C1INTP);
st_bit(PIE2,C1IE);
st_bit(INTCON,PEIE);
st_bit(INTCON,GIE);
If I have a macro called "TmrStart" I should insert...
Code: Select all
FCM_TMRSTART();
thanks, J.