Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adafruit Retrogame GPIO expansion - MCP23017 #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vdownemail
Copy link

Adafruit Retrogame modified in order to expand GPIO inputs. The configuration supports 2 player game: every player can use 6 buttons. There are also 2 buttons that controls ESC and PAUSE.

Interrupts coming from MCP23017 are handled using GPIO inputs. Once an interrupt is received, the driver check both interrupts states: this avoids losing interrupts signals.
@monkeywidget
Copy link

This rules! I was about to try writing this exact thing. Thanks vdownemail!

@monkeywidget
Copy link

I may be missing something, but it looks like your 6 buttons per player includes the START and COIN buttons.

So, for example, you still couldn't play Defender, which needs 5 buttons, or the Street Fighter series, which needs 6 buttons per player (not including START or COIN).

@vdownemail
Copy link
Author

Thank you monkeywidget ! MCP23017 can expand to 8 inputs per player (total 16 inputs) and this include 4 directions + 4 buttons. However there are other GPIOs on the raspberry you can use. I mapped only 2 GPIO in order to process MCP23017 interrupts; in addition 3 more GPIOs are used for SCL/SDA communication. The remaining GPIOs are all free.

I haven't tested with 2 MCPs but I think that if you need an ultra-dense button configuration you can use a second chip changing (of course) the chip address of the second MCP.

See ya

@vdownemail
Copy link
Author

PS: you can find other info here

http://www.raspberrypi.org/forums/viewtopic.php?f=78&t=74702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants