How to connect the MCP23017 GPIO Expander to an Arduino and Raspberry Pi

Поділитися
Вставка
  • Опубліковано 16 вер 2024

КОМЕНТАРІ • 58

  • @DevonsWorkshop
    @DevonsWorkshop 2 роки тому +2

    Working on a 16 step switch project. Each key has an embedded led. For 16 switches I actually need 32 gpio. Your video helped me to figure out how to work with this chip properly with a Pi Pico. Very helpful video! Thank you.

  • @aryansatpathy2404
    @aryansatpathy2404 3 роки тому +1

    This is soo helpful, I couldn't find any proper explanation anywhere else
    Helped me for my project

  • @samk2630
    @samk2630 3 роки тому +1

    Happy to stumble across your channel. Clear and concise, thank you!

  • @croll_uk
    @croll_uk 3 роки тому

    Tip: Check the Red & Blue lines on the power rails for any breaks that indicate power termination. Nice video, subbed :D

  • @Bradiant
    @Bradiant 3 роки тому +1

    That's some great quality video.

  • @dfmayes
    @dfmayes Рік тому +1

    I wouldn't recommend hooking up with power applied. Connect, check, then apply power.

  • @deanhuff123
    @deanhuff123 3 роки тому

    Very helpful. I’m attempting to revive the old diamond rio MP3 player parallel interface so I can get some new music on my 23 year old MP3 player :)

  • @MattRose30000
    @MattRose30000 4 роки тому +4

    Are the indicator LEDs at the left just wired between VCC and ground? Do I not need a resistor?

  • @muaddibinho
    @muaddibinho 4 роки тому +1

    Damn this was good. Subscription added!

  • @jackyre477
    @jackyre477 5 років тому +1

    Awesome, thanks for explaining! :D

  • @rccowboys
    @rccowboys 3 роки тому +1

    I really need to know how I can chain these together in a RPI3B+. Also How many can be chained together? Are the bandwidth considerations? I am trying to figure out a way to hook up about 20 stepper motors and a camera with a few sensors also. BTW awesome channel. Thank in advance for your reply.

  • @pruch04
    @pruch04 2 роки тому

    thanks dude!!!, you saved my life, get my like

  • @mikesfarmmikesfarm3977
    @mikesfarmmikesfarm3977 3 роки тому +7

    Sorry for comment, but do not teach new people to wire things up with power applied.

  • @YoucefYazid
    @YoucefYazid 3 місяці тому

    Hello, At first thanks for informations, just i want to ask why we use R 1K to reset pin?

  • @_teknq
    @_teknq 3 роки тому +1

    I am somewhat new to using the Raspberry Pi (3 B+) and I would like to expand my GPIO as shown in this video. I already have a 20x4 LCD display using pin 3 (SDA.1) and pin 5 (SCL.1). Can pin 27 (SDA.0) and pin 28 (SCL.0) be used instead to setup the expansion board while the LCD display is still connected to pin3 and pin 5?

  • @tiny-starship
    @tiny-starship 5 років тому +1

    What luck. I just got 5x MCP21017's in the mail today and was looking for a guide on how to hook them up!

    • @makersdigest4752
      @makersdigest4752  5 років тому

      Tiny Starship awesome! Let me know if you have any questions, or if I can help.

    • @falseee4445
      @falseee4445 5 років тому +1

      @@makersdigest4752 hello, if we have 2 mcp 21017 then for the code will it be 0 to 32 and not 0 to 16?

    • @MGort-bb8op
      @MGort-bb8op 3 роки тому

      @@falseee4445 Do you have the answer to that question? I`am realy curious..

    • @atom6_
      @atom6_ 3 роки тому

      @@MGort-bb8op The 2nd mcp should be set up with a different i2c address, you will get another 0 to 15 ports available. See arduino.stackexchange.com/questions/30862/how-to-use-different-device-address-for-mcp23017-so-i-can-use-multiple-chips

  • @powerralley
    @powerralley 4 роки тому +1

    Can someone briefly explain why a resistor is needed for the reset pin? Why can't it take the 3.3 straight?

  • @abdulkarim.jamal.kanaan
    @abdulkarim.jamal.kanaan 4 роки тому +1

    thank you very helpful video. one question, if modify the speed of i2c on raspberry, what the maximum number of chips we can use?

  • @jenniferw8963
    @jenniferw8963 Рік тому

    Have you measured how many microseconds it takes for digitalRead() and digitalWrite() using these 16 GPIO pins via I2C compard to the pins which come on the microcontroller? Just wondering how much slower it is. Hopefully it doesn't take more than say 100 microseconds.

  • @Al-pr5dk
    @Al-pr5dk 4 роки тому

    Exactly what I was looking for. Thanks!

  • @marcveselovsky
    @marcveselovsky Місяць тому

    Can you make it output a pwm signal? Pls help

  • @burhanuddinbhiwaniwala618
    @burhanuddinbhiwaniwala618 3 роки тому

    Wat if the power cuts... Can we save the status of th pins of MCP23017 in the eeprom of arduino so that it regains its last state before the power cut

  • @roystervi
    @roystervi 3 роки тому

    hi is it possible to have the Arduino and Raspberry Pi connected to the same ic2 line at the same time?

  • @furkanalperyildiz3729
    @furkanalperyildiz3729 Рік тому

    I have a problem, can anybody help me ? I have a mcp2307 and raspberry pi4 which is commmunicate with i2c protocol. When I set logic high one mcp pin all pin goes high. Have you any idea on this issue?

  • @platinumphonesandcomputers
    @platinumphonesandcomputers 3 роки тому

    a like for the intro

  • @JeroenUE
    @JeroenUE 3 роки тому

    Nice explaining!! How can I use this in Domoticz?

  • @stevenbeebe35
    @stevenbeebe35 Рік тому

    He never said what resistor to use with the LED. Anyone have an answer to this? Thank You.

  • @qozia1370
    @qozia1370 Рік тому

    What about esp32 running micropython? Thanks.

  • @djsbriscoe
    @djsbriscoe 3 роки тому

    Can you do a video on how to use this to control 1 or 2 i2c modules (say an I2C LCD to start with) using the arduino. For instance, how would you read from an I2C module and write to an I2C LCD through the MCP23017 (or MCP23S17 for SPI). Thanks.

  • @Snugggg
    @Snugggg 2 роки тому

    I'm very very new to this but can someone broadly explain the difference between this and a shift register?

  • @tinware
    @tinware 3 роки тому

    Do you know similar chips that work in USB 2.0 instead of i2c?

  • @oleksandrkosarevskyy882
    @oleksandrkosarevskyy882 5 років тому

    Hello. Thanx. Take the like. It works for me.

  • @newtitojff
    @newtitojff Рік тому +1

    I think I have fake ebay MCP's , that's the second tutorial I follow that does not work, Already bought MCP from Mouser :(

  • @chadpriddle00
    @chadpriddle00 2 роки тому

    I am using the Adafruit librabry and got my Python running. Is there a way to initiate the mcp() so that when I read the pins it says 1/0 not True/False?

    • @gamecoder3833
      @gamecoder3833 2 роки тому

      you can always define a small function to convert T/F to 1/0, tho calling it everytime can get annnoying....
      maybe make the function name really small like b2b (boolean to binary)?

  • @milslion863
    @milslion863 4 роки тому

    Hi. Sorry the stupid question... i can connect 4 mcp23017 to a Arduino Nano?? is for manage 64 reed switch (for a chess board). Thanks for your time.

    • @makersdigest4752
      @makersdigest4752  4 роки тому +2

      MilS Lion I believe you can have 8 of those IC’s on one I2C bus. You will need to configure the address pins on each one to have a separate address in order for that to work. Check the data sheet on how to do that. In a nutshell, all the SDA pins connect together, as well as SCL pins. Then address correctly.
      Hope that helps!

    • @milslion863
      @milslion863 4 роки тому

      @@makersdigest4752 Thanks!Yes that help.

  • @samuelhutagalung3357
    @samuelhutagalung3357 4 роки тому

    are the 5v and gnd pin really must be all connected? or just for 9 and 10 pin.

    • @makersdigest4752
      @makersdigest4752  4 роки тому

      It really depends on the grounds, pin 15,16,17 are the hardware address pins. I set them all to low to get a specific I2C address. But you can look at the datasheet on how to set specific addresses in case you are chaining more than one of these together. But personally, I like to set them all to low for single IC applications because it is stable.
      For the 5v on reset, I am going to say yes on that one for this application because that's the way I have always done it, and it works. I am sure there are other things you can do with that pin as it is a "reset", but would have to dig into the datasheet deeper than I have to figure it out. Otherwise, give it a try and see if it works!

  • @josephtannenbaum8696
    @josephtannenbaum8696 5 місяців тому

    No longer works. Adafruit made changes to the library.

  • @ぱんぷきん-i5k
    @ぱんぷきん-i5k 4 роки тому

    is this possible to use as analog input?

    • @makersdigest4752
      @makersdigest4752  4 роки тому

      ぱんぷきん hi there, no. Check the mcp3008 video here for analog inputs. This IC is only digital input

  • @eugeniostreliaevfilho8904
    @eugeniostreliaevfilho8904 4 роки тому

    very nice. pitty you stoped making videos

    • @makersdigest4752
      @makersdigest4752  4 роки тому +1

      Eugenio Streliaev Filho thank you! I’ve stopped temporarily on this channel because I have been busy making videos over on Element14 Presents. I have plenty more scheduled for this channel and will hopefully get back to it sometime soon!
      Check out Element14 Presents for some different types of builds. Lots of other great folks making there also!

  • @reryro1266
    @reryro1266 23 дні тому

    I've never met anyone in my life who thought it was a good idea to wire up digital circuits with power applied. And you do in it the worst possible way by connecting power before anything else.
    For any newbies watching this -- DON'T DO THIS. The video is a very poor example to follow.