In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rodneymc wrote: Have you checked out Gunther's Book? See pgs 99/100. It's in assembly but you should get the drift. Although not the exact subroutine he mentions, there is similar source code is in the TUT019.src file in the downloads section. It's basically checking the bit, delaying (typ 20-30msec), and see if it's still pressed after the delay. Here's an interesting link with some higher level examples. http://www.ganssle.com/debouncing.pdf ...or Google "switch debounce software" :o) Rodney ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=151224#m151251 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)