In SX Microcontrollers, SX/B Compiler and SX-Key Tool, nate wrote: Your programming solution depended on the shortest time interval of your input switch (high or low). With a 1/2 second "changed state" of your input (eternity to a micro controller), you can do this pretty much any way you want. You can place a loop somewhere in your main code, as long as you are sure that the inputs are tested at intervals less than 1/2 second. A more elegant, but more complicated-to-program solution, would be to wire the input switches as a matrix (google "keypad matrix") attached to rb (interrupt capable port). When the interrupt is triggered, you would need to decode the port status to determine which input was triggered. This way you would only send the resources looking at the input switches when there was a input event.(But if you are using the interrupt for other timing-dependant routines, this may not be possible). Nate ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=128956#m129106 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)