You may want to use 20 or 30 ms. 500 ms may be a bit too long. Depending on the app you may want to go on the app then check the key again. I've found little reason to wait on the key in most cases, but again that depends on your application. I personally think key debouce is over rated. Unless the key is processed within 5 or 6 ms, forget about it. I'll probably have a lot of critics on this opinion, but it works for me. Good luck. Matt.