• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pic can interrupts

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.

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
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
Not open for further replies.

Latest threads

EE World Online Articles