gnoble29
Member level 1
I try to interface a keyboard to pic 16f877a.But when i press a single key,the pic will consider as, i am pressing 3 times the same key.{when i press 2,pic will read it as 222} How can i avoid this??
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
...Most keypads suffer from contact bounce, it's caused by the mechanical switch contacts rebounding when they hit each other, the classic solution is to wait a short time after detecting the switch closure before checking it again. this process is called 'debouncing'...
Find out why first.
If the key actually is closing and opening three times you need to 'debounce' it. Most keypads suffer from contact bounce, it's caused by the mechanical switch contacts rebounding when they hit each other, the classic solution is to wait a short time after detecting the switch closure before checking it again. this process is called 'debouncing'.
The other possibility is that your software is simply reading the switch being closed repeatedly before it has time to open again. The solution to this is to read the keyboard again until it says no keys are pressed before continuing.
i think my software is simply reading the switch being closed repeatedly before it has time to open again. how i overcome this??