PDA

View Full Version : Question on using MCLR pin for interupt. (PIC12F683)



g-hoot
- 7th February 2009, 01:20
Hello,
If I use the MCLR pin instead of GP2 for an interrupt to wake from sleep, is there a way to detect the interrupt just on that pin (like you can on GP2) rather than enabling interrupts on the whole GPIO port? On another project, when doing something like this, after the interrupt, then I checked to see if the specific pin was low. Is that the only way to do it?
Gary

gmglickman
- 7th February 2009, 01:42
If the MCLR pin is brought low a reset will occur, waking the PIC from sleep and starting your code from the beginning. No interrupts needed, although you code may want to distinguish between an initial power-up and a MCLR reset, depending on your application.

RussMartin
- 7th February 2009, 02:15
Can't this be set on a pin-by-pin basis using the IOC register and setting the GIE bit in the INTCON register?