| ??? 05/26/03 10:09 Read: times |
#46633 - RE: Debounce ? Responding to: ???'s previous message |
Assume that you have written "1" to a port pin used as input. READ: Wait here till the port pin goes low Debonce : Delay for 20mSec or So. Check : Is the port pin still low ? If yes, then you got a valid keypress. Do something based on it. If no, it was a invalid keypress. Go back to READ. Note : The 20ms is typical. You may have to vary it upwards till you get the optimum value. And this is not a good way to read a switch. Holding a processor to read a switch only is bad. Sample shown just to explain the debounce. Otherwise ideally done with interrupts. Read the 8051 Bible for info on that. Raghu |
| Topic | Author | Date |
| Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
| RE: Debounce ? | 01/01/70 00:00 | |
RE: Debounce ? | 01/01/70 00:00 |



