In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Sparks-R-Fun wrote: Altitudeap, I would try something like this: [code] KeyChanged = 0 ' Initialize Key Change bit variable. FirstKey = GET_KEY ' Remember the First Key value seen. For i = 1 to 5 ' Loop to debounce keypad inputs. theKey = GET_KEY ' Get the current keypad value. If theKey <> FirstKey Then ' Detect keypad changes. KeyChanged = 1 ' Indicate that a key has changed. EndIf Next i ' Repeat If KeyChanged = 1 Then ' Detect keypad changes and... theKey = 16 ' Treat it as if no key was pressed. EndIf [/code] You will need to declare i and FirstKey as byte variables and KeyChanged as a bit variable. - Sparks ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=151224#m151256 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)