MCP23017 Assistance


#1

Hi,

I’ve just started using Cayenne and have been quite impressed by the array of features so far. A few niggles here and there but on the whole excellent. I do have a couple of queries around the MCP23017 i2c 16 channel digital I/O ICs.

  • Is it possible to enable the internal pull-up resistors? This one is a bit of a deal breaker as I’d need to redesign the electronics if that was the case

  • On the Android interface I can only see the first 8 I/O ports on the interface viewer. Is it possible to see all 16?

I haven’t got too much further in to it Cayenne yet but thank you for what I have seen so far.

Regards.


#2

I haven’t specifically used MCP23017, @eptak do you know if possible to enable internal pull-up resistors?

-B


#3

The MCP23017 does indeed have internal 100K ohm pull-ups on it’s Bidirectional I/O pins, as stated on page 11 of the MCP datasheet, and addressing the pull-up resistor is covered in more detail on page 22.

Also, methods for addressing all 16 of the I/O using (2) “port interrupt” pins used in conjunction with the (3) address pins are discussed.

http://ww1.microchip.com/downloads/en/DeviceDoc/20001952C.pdf


#4

Hi @liveitnerd,

Looks like @HighTech answered your question about internal pull-up on the MCP23017.

Let us look into only 8 I/O ports on the interface viewer, I think you’re right that there should be 16.

-B


#5

The MCP23017 has its GPIOs arranged into (2) banks of (8)- kind of weird, but pretty much the same thing as putting (2) MCP23008 on a single bus.
This internal pull-up parameter “should” be addressed in the chip setup in the Cayenne configurator.

Please, keep us updated @liveitnerd , and thank you-
I’ve learned about a new chip! Kewl beans!

I originally posted the Adafruit datasheet for the MCP23017, but the MCP datasheet is MUCH more detailed.
Adafruit kind of surprised me on that one. :frowning:


#6

Well, I didn’t actually “answer” the question- but I narrowed the parameters to addressing the issue in the Cayenne “configurator”- :wink: I’ll dive a little deeper into it. Interesting little chip-


#7

My WAG would be-
if the pull-up option isn’t available for the Pi GPIO,
-then the option isn’t available in the GPIO expander, either.

Simple answer is to use external pull-up resistor pack
http://www.digikey.com/scripts/DkSearch/dksus.dll?Detail&itemSeq=206610746