| ??? 09/11/08 09:45 Read: times |
#158178 - What debounce? Responding to: ???'s previous message |
You claimed:
"am sampling the input port using a while(1) infinite loop inside main()." But you don't show how you sample the input. All you show is a function call. And your code looks a bit strange: Key_Scan(); ch = keypad[R][C]; Normal code would probably look like:
ch = Key_Scan();
if (ch != 0) {
/* a key was detected */
...
}
I assume that keypad[][] is a translation from a key position to a character. But what exactly are the values of R and C if no key is pressed? Wouldn't they either point to a valid key - in which case you get a false match - or point outside the lookup table? |
| Topic | Author | Date |
| HELP:regular monitoring of inputs 8051 | 01/01/70 00:00 | |
| Use a timer ? | 01/01/70 00:00 | |
| Explain | 01/01/70 00:00 | |
| NOT WORKING | 01/01/70 00:00 | |
| instant doesn't exist | 01/01/70 00:00 | |
| Make your mind up! | 01/01/70 00:00 | |
| bounce | 01/01/70 00:00 | |
| Sounds strange ... | 01/01/70 00:00 | |
| sampling | 01/01/70 00:00 | |
| Please post legible source code | 01/01/70 00:00 | |
| What debounce? | 01/01/70 00:00 | |
| code | 01/01/70 00:00 | |
| Did you check the preview? | 01/01/70 00:00 | |
| Broken code | 01/01/70 00:00 | |
| indentation | 01/01/70 00:00 | |
| Simulation | 01/01/70 00:00 | |
| Regular | 01/01/70 00:00 | |
| Why not reading from main loop? | 01/01/70 00:00 | |
| PLEASE HELP | 01/01/70 00:00 | |
| have a look at Rate This Post | 01/01/70 00:00 | |
| Study the state machine tutorial... | 01/01/70 00:00 | |
Is it here? | 01/01/70 00:00 |



