Software Support > Automated Projects

12 position rotary switch > 2 keyboard encoder inputs, simple hardware solution?

<< < (3/5) > >>

PL1:

--- Quote from: melvinbates on January 23, 2017, 06:46:56 pm ---it may just be easier to either figure out how to get the KADE firmware working on a cheap ATMEGA32U4 board

--- End quote ---
Well, the easiest way would be to buy a Minimus from MaxRod.   ;D

If my preliminary research is right, and you use the single-joystick P1 or P2 versions of the KADE rotary firmware, you should be able to load the hex firmware on a Pro Micro and run it as-is.

The KADE rotary inputs are terminals B1-B3

Term.|32u2 Pin|32u4 Pin|Pro Micro Board Label
B1         16         10         16
B2         17         11         14
B3         18         28         8

That would allow the Pro Micro to handle the rotary keystrokes and you could use another encoder for the buttons and joy up/down/left/right.

The 2-joystick version uses terminals A8-A10 (P1) and B8-B10 (P2) for rotary.

As you can see here, I have no idea where 4 of those 6 pins would end up without doing some more testing.    :dizzy:


Scott

BadMouth:

--- Quote from: melvinbates on January 23, 2017, 06:46:56 pm --- My current concern is how long to pull down the L/R lines so that the keyboard/gamepad encoder recognizes it as an input/button press, but doesn't hold it more frames/poll cycles than necessary and counts one rotation twice.

--- End quote ---

I could be oversimplifying, but.....as long as a key press.  Browsing google results, 20 milliseconds seems to be a popular number.

I'm not sure what MAME does if you just hold down the button, but I can test in the next few days.
(long time for such a simple thing, but I am a busy with work and other projects...and too lazy at the moment)

melvinbates:
I could be overthinking it.  Let me know what your tests reveal.

On another note, I finished designing a schematic and circuit board in eagle.  I'll get started on the programming this weekend or early next week.

BadMouth:
Fired up Ikari Warriors and Victory road on MAME v.146 which is the revision my cab is on. MAME isn't picky.  Quick tap, long press, hold forever...the guy only rotates on position then stops.

melvinbates:
Great, that's very helpful.  Once this week is over I'll work on getting a prototype together.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version