Ultra Control Sdn. Bhd. wrote: > Anyone for the old Debouce challege: Hmmmm. > What is the fool proof way to read the key? I used the code below with > inconsistent result although is does work. Code reduces to: Wait for key_down Delay 50ms Wait for key_up I substituted 50ms since, as others have noted, it«s more like a useful debounce period. First problem I see is that if your operation executes and loops back very fast, the "release" bounce will trip the wait for key_down immediately. You may therefore wish to put a second delay in the loop somewhere. The only other matter I notice is that I very rarely think of waiting for one keypress as the only function of the system ("Busy wait"). This is significant as the "other" jobs you may want to do whilst waiting often provide a very useful debounce delay. The Stamp code "BUTTON" uses this beautifully. Look at http://www.dontronics.com/see.html#button for ideas. > Or any recommendation of a cheap hardware configuration. Cheap? Ha! Cheapest is (usually) software! -- Cheers, Paul B.