Jump to content

Help! Confused About How to Connect Buttons


grnsky
 Share

Recommended Posts

Hi, I was hoping someone might be able to help me here. I finished stuffing my DIN board and am ready for the buttons, but first of all, dumb question, what's the difference between buttons and encoders; when I looked on ucapps.de it offered a PDF on how to connect encoders to the DIN. Is an encoder a pot?

Anyway, I think I want buttons. Now in the buttons PDF on ucapps (http://www.ucapps.de/mbhp/mbhp_dinx4_32buttons.pdf) there are 8 jumpers, but on mine (smashtv DIN kit module) there are only 4 jumpers, each with two rows. Also the ucapps PDF seems to suggest that I ground half the buttons to one Vs and the other half of the buttons to another Vs, utilizing only two of the 8 possible Vs pins.

So I'm confused because I have the smash DIN kit. Do I ground my buttons to the Vs of whatever jumper they are connected to via D-pin? Or do I ground my buttons to only 2 Vs pins as in the ucapps PDF, even though I have a different jumper layout? Or, yet another possibility, do I chain the ground terminals on ALL the buttons and touch it down to just one of the Vs pins, doesn't matter which. OR, yet ANOTHER possibility, do I chain the ground of every 8 buttons (grouped by the jumper they're connected to via D-pin) and touch that down to the Vs pin on the respective jumper?

I hope this question makes sense. However anyone can answer it will I'm sure be super helpful to me. Thank you very much!

Link to comment
Share on other sites

Is an encoder a pot?

no

Anyway, I think I want buttons.

that means you don t need any extra explanation right?

So I'm confused because I have the smash DIN kit. Do I ground my buttons to the Vs of whatever jumper they are connected to via D-pin? Or do I ground my buttons to only 2 Vs pins as in the ucapps PDF, even though I have a different jumper layout? Or, yet another possibility, do I chain the ground terminals on ALL the buttons and touch it down to just one of the Vs pins, doesn't matter which. OR, yet ANOTHER possibility, do I chain the ground of every 8 buttons (grouped by the jumper they're connected to via D-pin) and touch that down to the Vs pin on the respective jumper?

any of these would work

Simone

Link to comment
Share on other sites

Really! Wow, well that's easy enough. I'd still be curious though, how is the encoder different from a button?

Also, for my buttons, I understand I need 'single-pole normally open' buttons...will these arcade push buttons here work?

http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&Item=120369534626&Category=13718#ht_590wt_1048

Is it possible to use similar push buttons that actually light up when they are depressed like these?

http://cgi.ebay.com/SET-OF-12-SQUARE-PUSH-BUTTONS-W%2fLIGHT-FOR-ARCADE-GAMES-_W0QQitemZ120383322062QQcmdZViewItem#ht_1013wt_1048

Link to comment
Share on other sites

the buttons just make an electrical connection (a short) between vss and the data pins.  when you press them, it loads the DIN shift register and mios scans it to see which buttons have been pressed..

encoders work sort of like two buttons.  one button to turn one direction, and another for another direction.  however you need to tell mios where the encoders are because they actually create a series of pulses that tell mios which direction they've been turned.

for the buttons, single pole works, as do any other number of poles.  all that matters is you connect a data pin and vss to poles that are not connected when the button is not pressed, and are connected when the button is pressed.  video game buttons work for this, i believe.  any normally open, momentary switch works.

for illuminating switches, you have to drive them with a DOUT module.  consider the LED to be a separate thing from the switch:

switch is pressed (shift register loaded on DIN module)

core scans for pressed switches

core executes code on switch press - code could include telling an LED to illuminate with a DOUT module

if you only wanted the LED to illuminate as the button is pressed, you could use a two-pole switch, as long as the poles are always isolated from each other.  one pole could be connected to the DIN module, the other could complete a circuit that connects vss/vdd to the led and a resistor.

ultra

Link to comment
Share on other sites

I see. So in other words, you could use a two pole switch to send one message when toggled one way and a different message when toggled the other way? Could you have like one huge encoder, maybe a dial with 50 different things to turn it to (or "poles" i guess) or would it have to have no more than 32 things to turn it to? Or would it have to have no more than 8 things to turn it to since that's how many D's there are on each of my jumpers?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...