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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/19/04 02:30
Read: times


 
#81490 - pushbutton stuff
Responding to: ???'s previous message


Normally I wouldn't use an external interrupt for pushbutton input except if I needed to wake the micro up from a sleep. Usually I would have a timer set up to interrupt at say 10mS. Apart from using this for task scheduling, I would have it read the push buttons. With a little code you can count the number of ticks the button has been held and when it has been released. I've used something similar for an up/down button for setting values. The longer the button is held, the faster the value increments/decrements.

If you use the external interrupt for waking the cpu up, disable the external interrupt after power up and have the timer isr poll the pushbuttons.





List of 9 messages in thread
TopicAuthorDate
ON-OFF - Press and Hold for 2nd Function            01/01/70 00:00      
   Change time            01/01/70 00:00      
      Change time            01/01/70 00:00      
   Duh - typo sorry            01/01/70 00:00      
   Use a timing function            01/01/70 00:00      
   not counter - intuitive            01/01/70 00:00      
      not counter - intuitive            01/01/70 00:00      
      More info needed            01/01/70 00:00      
   pushbutton stuff            01/01/70 00:00      

Back to Subject List