In SX Microcontrollers, SX/B Compiler and SX-Key Tool, John Kauffman wrote: Stef: I'm not the greatest, but I'll throw in what I know. Sounds like you have MyInputPin and MyOutputPin. You want the pulses on MyOutputPin only while MyInputPin is high. I don't know of a way to turn on and off execution of timed interrupts at run time if you are using teh INTERRUPT RATE directive. So I would keep running the ISR every 20 mSec and within there either send a pulse or not depending on state of MyInputPin ' ** untested ** INTERRUPT 500 ISR_Start: IF MyInputPin=1 THEN PULSOUT MyOutputPin,5 ' units by default are 10 uS ENDIF ISR_Exit: RETURNINT >>>>>>>>>>>>>>>>>>> Alternately you could not set RATE and instead code the RTTC with prescalar. I think that call for ISR can be turned on and off at run time by setting the Option bit 6. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=157491#m157644 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)