In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rremme wrote: Thanks for the quick response! Here's an abreviated version of the code. When the sensor is taken high, the interrupt is triggered and the IF statement within the interrupt turns on LED1. But the same IF statement below in the main program won't turn on LED2. DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX FREQ 4_000_000 Sensor PIN RB.0 INPUT INTR_RISE LED1 PIN RA.0 OUTPUT LED2 PIN RA.1 OUTPUT Counter VAR Byte INTERRUPT NOCODE ISR_Start: IF Sensor = 1 THEN Counter = 60 IF Counter <> 0 THEN LOW LED1 Pause 200 HIGH LED1 ENDIF ENDIF ISR_Exit: WKPND_B = %00000000 RETURNINT PROGRAM Start Start: WKED_B = %11111000 WKEN_B = %11111000 WKPND_B = %00000000 HIGH LED1 HIGH LED2 Counter = 0 Main: IF Counter <> 0 THEN LOW LED2 Pause 200 HIGH LED2 ENDIF PAUSE 5000 Counter = 0 GOTO Main[code] ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=346337#m346368 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)