Shop OBEX P1 Docs P2 Docs Learn Events
Hardware to Catch Button Pushes — Parallax Forums

Hardware to Catch Button Pushes

edgellmhedgellmh Posts: 85
edited 2008-06-08 18:32 in General Discussion
I need to catch whether a button has been pushed but the microcontroller is likely to be busy with other things when the button is pushed. All of my VP functions will be off doing other things (6 Uarts and a timer) so I cannot create one to watch the button(s). This assumes I cannot delete a Uart to make room for a button watcher and later recreate the Uart because of the lack of garbage collection. I assume some clever chip can catch button presses and then I would need to poll that chip. What chip would I use?

marshall hall edgell

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-06-06 21:42
    You'd poll it and then clear it (two I/O pins.)

    http://en.wikipedia.org/wiki/SR_latch#Simple_set-reset_latches

    Post Edit -- Some things not shown, but I think should, are:·when the "keep state" is 1 the inputs should be pulled up, when the "keep state" is 0 the inputs should be pulled down.

    Post Edited (PJ Allen) : 6/6/2008 9:50:05 PM GMT
  • edgellmhedgellmh Posts: 85
    edited 2008-06-08 12:16
    Thanks,. Exactly the hardware solution I need.
    Tell me about pulling up or pulling down an input. I am totally a novice at this hardware stuff.

    marshall
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-06-08 13:05
    They would prevent the "restricted condition" (a.k.a. "not allowed") from occuring if any input was disconnected.

    You'll need to avoid Resetting while someone is leaning on the button.· If something like that seems likely, then you'll have to run the button into a "one-shot".

    Post Edit -- Maybe it'd be helpful to construct the circuit with two button circuits, one·for 'R' and·one for 'S', and an LED (OK, an LED & a resistor) on Q, to really get the·idea of how this guy works.

    Post Edited (PJ Allen) : 6/8/2008 1:38:37 PM GMT
    430 x 314 - 17K
  • edgellmhedgellmh Posts: 85
    edited 2008-06-08 18:17
    Thanks. I'll give it a try.
    What software do you use to draw circuitry?

    marshall
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-06-08 18:32
    It's a very sophisticated graphics utility -- MS Paint.· smile.gif

    I've been known to draw up something with pen & paper and run that through a flatbed scanner, too.
Sign In or Register to comment.