Page 1 of 2
DMG I2C PCB Help
Posted: Sat Jul 02, 2016 11:27 pm
by roneyizpie
So, I accidentally bought the custom PCB from Kitsch-bent that uses I2C instead of the traditional solder points and I have no idea how to use it. Does anyone know where to point me to figure out how to use it? Where would I solder it to my Pi? I've never done anything with I2C before, and I am totally confused. It's the last part I need to finish and I'm done! So all help is appreciated.
This one:
http://store.kitsch-bent.com/product/ex ... 2c-version
Re: DMG I2C PCB Help
Posted: Sat Jul 02, 2016 11:33 pm
by Kilren
roneyizpie wrote:So, I accidentally bought the custom PCB from Kitsch-bent that uses I2C instead of the traditional solder points and I have no idea how to use it. Does anyone know where to point me to figure out how to use it? Where would I solder it to my Pi? I've never done anything with I2C before, and I am totally confused. It's the last part I need to finish and I'm done! So all help is appreciated.
This one:
http://store.kitsch-bent.com/product/ex ... 2c-version
@kitsch-bent
Re: DMG I2C PCB Help
Posted: Sun Jul 03, 2016 2:14 am
by FreddySalted
Take a look at this page as they use the same MCP23017 I2C chip as the Kitsch-Bent PCB
https://github.com/recalbox/mk_arcade_joystick_rpi
Scroll about 2/3 of the way down the page. I have not tested this method, nor do i plan to implement it. Just trying to help with a little piece of info I found.
Re: DMG I2C PCB Help
Posted: Sun Jul 03, 2016 9:07 am
by roneyizpie
Thanks guys! Yeah I've looked everywhere and can't find an answer really O.o I appreciate the link! I'll hopefully have this figured out today.
Re: DMG I2C PCB Help
Posted: Tue Jul 05, 2016 11:08 pm
by Kilren
roneyizpie wrote:Thanks guys! Yeah I've looked everywhere and can't find an answer really O.o I appreciate the link! I'll hopefully have this figured out today.
Any luck yet? @kitsch-bent is a user on the forum, I was hoping he'd say something the last time I pasted him and support his product.
Let us know if you solve it.
Re: DMG I2C PCB Help
Posted: Tue Jul 05, 2016 11:14 pm
by kitsch-bent
Kilren wrote:roneyizpie wrote:Thanks guys! Yeah I've looked everywhere and can't find an answer really O.o I appreciate the link! I'll hopefully have this figured out today.
Any luck yet? @kitsch-bent is a user on the forum, I was hoping he'd say something the last time I pasted him and support his product.
Let us know if you solve it.
must have missed the notification before, my bad!
the place to solder this board to the Pi depends entirely on your code and how you are addressing it. there isn't a standard way, its really up to you in how you set up your Pi for I2C communication. this particular IC (MCP23017) is used a lot in hobby projects and you'll find a lot of examples using it if you poke around google. including on/with a Pi.
the example code on the product page is an arduino script which is basically good for testing it and to see the bare minimum setup required to get the IC going. (internal pull-ups and reading inputs). make sure you engage the internal pull-ups in your code otherwise you'll get bad readings back.
Re: DMG I2C PCB Help
Posted: Tue Jul 05, 2016 11:56 pm
by Fleder
Excuse me, but i am hijacking this thread.
Can someone please explain to me the differences of this method?
What are the pros and cons of using I2C instead of the usual way?
Is this saving pins or only wires? You would still need a Teensy/Arduino, i guess.
Re: DMG I2C PCB Help
Posted: Wed Jul 06, 2016 8:48 am
by kitsch-bent
Fleder wrote:Excuse me, but i am hijacking this thread.
Can someone please explain to me the differences of this method?
What are the pros and cons of using I2C instead of the usual way?
Is this saving pins or only wires? You would still need a Teensy/Arduino, i guess.
its saving a lot of pins/wires. instead of the normal 'Ground + number of buttons' on a regular board, this cuts it does to 4.
you don't need an additional microcontroller, you can do it straight from the Pi itself.
i don't really see any cons, apart from needing to set up the IC on the Pi (which is a DIY element, but then again... this entire project is). it can read multiple button presses, the IC can work incredible quickly... i'm not sure there is a con when compared to the original boards that have so many wires. perhaps there is and i'm just not recognizing it yet. these ICs are pretty nifty, and can really help clear up space in a project either pushing the limit on available connection points, and clear up space in the case by cutting down on the wires being used
Re: DMG I2C PCB Help
Posted: Wed Jul 06, 2016 10:36 pm
by chiz
Fleder wrote:Excuse me, but i am hijacking this thread.
Can someone please explain to me the differences of this method?
What are the pros and cons of using I2C instead of the usual way?
Is this saving pins or only wires? You would still need a Teensy/Arduino, i guess.
@Fleder
See this page:
Preparation of the RPi for MCP23017
Re: DMG I2C PCB Help
Posted: Thu Jul 07, 2016 12:12 am
by Fleder
Thank you Kitsch and Chiz!
So, one is placing an IC on the board that does all the work instead of letting the Teensy or the Pi do it.
But that does mean i have to sacrifice some GPIO pins, i guess. Is the IC doing some kind of multiplexing?
The way i understand it is, that it is the same as connecting the buttons right to the GPIOs but with fewer wires because of multiplexing.