??? 12/06/09 17:19 Read: times |
#171489 - What methods do you have for keeping track of time now? Responding to: ???'s previous message |
Daniel Contarino said:
Probably you will need some counter for timing (10mS for example?) Watch out for milli-siemens (Siemens = 1/ohm). If thinking milli-seconds, then it's a small s, as in ms. OP: Do your program have any way of counting time? Any timer interrupt or something else happening regularly? If so - use normal variables to keep track of number of iterations of your loops. You somewhere needs a time estimate for debouncing your keys. You would probably also want some time estimate for generating key repetitions if an up or down key has been pressed for a longer time. And both for debouncing and for key repetitions, you need to be able to measure quite short time spans. Preferably in 10ms increments. 100ms or worse granularity may lead to a sluggish system where the buttons doesn't feel responsive if someone is really fast. |
Topic | Author | Date |
one key, multiple jobs assigned to it | 01/01/70 00:00 | |
Step by step | 01/01/70 00:00 | |
What methods do you have for keeping track of time now? | 01/01/70 00:00 | |
Timing in Siemens ;)? | 01/01/70 00:00 | |
RC circuit | 01/01/70 00:00 | |
Yep, touché!... | 01/01/70 00:00 | |
Another idea... | 01/01/70 00:00 | |
State machine | 01/01/70 00:00 | |
State Transition Diagram | 01/01/70 00:00 | |
Timers can help!! | 01/01/70 00:00 | |
In theory, zero timers are needed | 01/01/70 00:00 | |
"I do not have any timer interrupts left." | 01/01/70 00:00 | |
Software timers | 01/01/70 00:00 | |
To check debounce | 01/01/70 00:00 | |
what happens when![]() | 01/01/70 00:00 |