LTolledo
Posts: 1357
Joined: Sat Mar 17, 2018 7:29 am

MCP230xx library for RPi: "Old" Adafruit vs CircuitPython

Sat Feb 09, 2019 12:11 am

Good day everyone!

I've been using the "old" Adafruit MCP230xx library for some time now, mostly for output stages only.
Then I just recently stumbled upon Circuit Phyton's MCP230xx library, which is supposed to supersede the "old" one.

Have not deployed it yet and want to ask around from someone who have used both before porting to the "new format"

What's the difference between the two (aside from the naming of course!)?
Is it easier to use?
inputs more stable? (do I still need a Schmitt trigger circuit for the input stage?)
how does it handle interrupts?
any known issues/problems/limitations with this library?

tried to search around the net ("googled around" as most person would say recently), but did not return any relevant hits on the matter.

a few good example codes (actually used scripts) would be appreciated.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

LTolledo
Posts: 1357
Joined: Sat Mar 17, 2018 7:29 am

Re: MCP230xx library for RPi: "Old" Adafruit vs CircuitPython

Mon Feb 11, 2019 11:08 pm

Well... after sometime and no replies indicate nobody is using CircuitPhyton for MCP23017/MCP23008 I/O expander ICs.

Probably most of us are still using the "old" version.

... and browsing on the gpiozero docs and it's github pull-up request, integration of the MCP23017/MCP23008 (and its SPI variants) are still not available....
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

snowbord
Posts: 12
Joined: Thu Dec 20, 2018 12:37 pm

Re: MCP230xx library for RPi: "Old" Adafruit vs CircuitPython

Tue Apr 16, 2019 9:45 pm

I wanted to chime in that I am too am exploring ways of driving the MCP230xx. How are the old Adafruit libraries holding up for you? Do they do interrupts? I noticed that this library, part of CircuitPython seems to tidy up I2C communication nicely, which the stock SMBus library has some issues with (not being truly transaction based). https://github.com/adafruit/Adafruit_Ci ... _BusDevice

I picked it up from this video:
https://www.youtube.com/watch?v=kxaFbDY-wH0

I'm currently evaluating using Pigpio, the Adafruit libraries, going the JavaScript route ( fivdi/pigpio, fivdi/i2c-bus, fivdi/onoff) to name but a few, but I really don't want to be re-inventing the wheel, aka bugs, banging the chip registers directly. There really should be a higher level abstraction.

I also stumbled across this. Anyone used it?
https://github.com/owainm713/MCP230XX-Python-Module

Return to “Advanced users”