Pic can interrupts

Status
Not open for further replies.
I am asking a very stupid question. I am getting confused with remembering interrupt enable bits , flags setting and clearing. Is there any simple kind or common kind of architecture where I can easily remember this setting and clearing. I have written drivers several times, but if someone asks or if I have to write again it will look like new again. Please help.
 
In XC8... you can just use the name of the interrupt ie.. INTE, You don't have to worry where it is all you need to remember is, if it's a peripheral interrupt set PEIE and GIE together..

If you aren't using XC8 then stick the defines in a header that you can call each time...

#define IntBit INTCONx.x

where x is the relevant bit
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…