??? 03/23/10 16:29 Modified: 03/23/10 16:53 Read: times |
#174432 - wow Responding to: ???'s previous message |
how the hell did i not see this unbelievably simple solution, especially as i am using macro for disabling interrupts anyway, and have been playing around with them very recently. a big thanks to you kind sir. Would you still suggest using an RC debounce as well? I am thinking possibly not... it may prove more advantageous to have a sharp / 'clean' falling edge?
i do have another question, there are reccomendations NOT to call a function from an ISR. however for this application I am simply asking the micro to set an ouput high, and poll (using a while loop) an input port pin until it returns low, then deactivate the output, and do the same with a different set of output and input pins. as you can see, this is hardly calling a function dealing with 16-bit math, or floating point operations, and so the compiler should not have problems with stack space (saving the scratchpad SFR's that are used in the function, and then popping them back off the stack afterwards), and therefore it should be safe to call this funtion from my ISR. or have i completely misunderstood this. if so let me know and I can try and figure out why. cheers for the quick reply as ALWAYS! edit: infact my own asnwer to this question: if the code is that simple dont call it, simply use it in the ISR! |
Topic | Author | Date |
switch input > interrupt (debouncing) | 01/01/70 00:00 | |
double post | 01/01/70 00:00 | |
Why the extra hardware? | 01/01/70 00:00 | |
wow | 01/01/70 00:00 | |
other ISR recommendation | 01/01/70 00:00 | |
or the other solution (my favorite) | 01/01/70 00:00 | |
using timer | 01/01/70 00:00 | |
Some switches have very long bounce time | 01/01/70 00:00 | |
a lot depends on the switches themselves | 01/01/70 00:00 | |
which is a $#@!! disaster | 01/01/70 00:00 | |
Remember that there is more than push buttons out there | 01/01/70 00:00 | |
What about the others? | 01/01/70 00:00 | |
Majority of implementations synchronizes with key down | 01/01/70 00:00 | |
Now I'm confused ... | 01/01/70 00:00 | |
Not Sure About The Code | 01/01/70 00:00 | |
More info on PC keyboard![]() | 01/01/70 00:00 | |
Short spikes | 01/01/70 00:00 | |
The real problem with debouncing | 01/01/70 00:00 |