In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: Steel, Before doing the "WKPND_B = WKPENDING" instruction you need to set "WKPENDING" to the value you want to swap INTO WKPND_B (usually zero). But besides that, the bits in the WKPND_B register get set whenever ANY pin on port b changes state, whether it is setup for an interrupt or not. You need to mask out the other bits if you only want to see the one that caused the interrupt. You can just use a "WKPENDING = WKPENDING AND 2" after the "WKPND_B = WKPENDING" line. Note that this behavour can be very useful if you want to see if a signal changed on a pin without using an interrupt. Just clear the bit in WKPND_B then check it later. If the bit is high then the pin changed. Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=136911#m136917 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)