Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
05/17/01 08:09
Read: times


 
#11646 - RE: Timers&Counters
Hi Anil,

Debouncing software:

Suppose your switch is hooked to P1.0

switch bit p1.0

main

jb switch,$ ; wait for button press

call delay ; wait untill all bouncings have gone

jb switch,main ; repeat if contacts are still dancing :)

call program ; do whatever by pressing button

sjmp main ; ready for another button press


program

--- -----
ret



delay

................ ; any suitable delay loop for 10 to 100 msec.

ret



end


The actual code would depend on what exactly you want to do. This code is only a direction you can go to.


Simon




List of 19 messages in thread
TopicAuthorDate
Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      
RE: Timers&Counters            01/01/70 00:00      

Back to Subject List