??? 02/06/06 13:26 Read: times |
#109286 - naah and to the question bu the OP Responding to: ???'s previous message |
Although Erik may opine otherwise, there is no such thing as immediately
naah, I agree. Just when someone states that milliseconds is "immediately" do I "opine otherwise". Even with my current f130s an interrupt can take almost a microsecond to execute. to the question by the OP a way to do keys which I use is as follows 3 variables (since I have not seen if you use C or asm, I use byte and bit) byte old key byte new key bit key is new run a timer at 10ms (or whatever is needed for debounce) timer ISR: read keys to new key if new key different from old key { old key = new key set key is new ) in the main loop: if key is new is set { if old key = 0 - just release of a key else process key clear key is new } Erik |