Shop OBEX P1 Docs P2 Docs Learn Events
Maxim MAX7301 20-Port I/O Extender — Parallax Forums

Maxim MAX7301 20-Port I/O Extender

Dave MatthewsDave Matthews Posts: 93
edited 2013-08-05 14:13 in Propeller 1
I am considering using this device with the propeller, and I wondered if anyone has had experience with it. This is an SPI device, and perhaps someone has written the support code or snippets already?
Dave

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2013-08-02 14:35
    There is SPI code in obex. All the SD drivers use SPI (fsrw, fsrwfemto, FatEngine) and there are probably a few that drive other SPI devices too.
  • phatallicaphatallica Posts: 64
    edited 2013-08-03 23:23
    I am considering using this device with the propeller, and I wondered if anyone has had experience with it. This is an SPI device, and perhaps someone has written the support code or snippets already?
    Dave

    Is there something special about this particular device? It seems to be a rather expensive option ($0.20 per I/O in small quanitities). By comparison, I have used Microchip's MCP23S17 with good results. It is only 16 I/O, but it is addressable so multiple may be used on the same SPI bus. Also it is <$0.10 per I/O in small quanitities.

    I am converting the code from BS2p to PropBASIC now if that is of any interest.
  • JonnyMacJonnyMac Posts: 9,107
    edited 2013-08-04 09:25
    If you use the MCP23017 you get the same 16 IO, can use up to eight of them, and you don't consume any available IO pins as they can be connected to the boot eeprom's I2C buss.
  • phatallicaphatallica Posts: 64
    edited 2013-08-04 12:56
    http://forums.parallax.com/showthread.php/107967-mcp23017-(i2c)-example-code?highlight=MCP23017

    Reference link above for more info on MCP23017, including Jon's own SPIN code.

    Saving IO pins is a good point - the only gain from the SPI version is the ability to communicate faster, and I doubt that this is necessary for most applications.
  • Dave MatthewsDave Matthews Posts: 93
    edited 2013-08-05 05:48
    Cluso99 wrote: »
    There is SPI code in obex. All the SD drivers use SPI (fsrw, fsrwfemto, FatEngine) and there are probably a few that drive other SPI devices too.
    Thanks, I have studied a few of the examples, and used a couple of routines for the Microchip A>D and D>A parts.
    Dave
  • Dave MatthewsDave Matthews Posts: 93
    edited 2013-08-05 05:52
    phatallica wrote: »
    Is there something special about this particular device? It seems to be a rather expensive option ($0.20 per I/O in small quanitities). By comparison, I have used Microchip's MCP23S17 with good results. It is only 16 I/O, but it is addressable so multiple may be used on the same SPI bus. Also it is <$0.10 per I/O in small quanitities.

    I am converting the code from BS2p to PropBASIC now if that is of any interest.

    I mistyped, I am planning to evaluate the 28 port version. But thanks for the response, I will look into that part as well!
    Dave
  • Dave MatthewsDave Matthews Posts: 93
    edited 2013-08-05 05:53
    JonnyMac wrote: »
    If you use the MCP23017 you get the same 16 IO, can use up to eight of them, and you don't consume any available IO pins as they can be connected to the boot eeprom's I2C buss.

    Very nice! Thanks for the tip, I will look into that chip.
    Dave
  • Dave MatthewsDave Matthews Posts: 93
    edited 2013-08-05 05:54
    phatallica wrote: »
    http://forums.parallax.com/showthread.php/107967-mcp23017-(i2c)-example-code?highlight=MCP23017

    Reference link above for more info on MCP23017, including Jon's own SPIN code.

    Saving IO pins is a good point - the only gain from the SPI version is the ability to communicate faster, and I doubt that this is necessary for most applications.

    I expect the I2C implementation to be more than fast enough, I will get some of those chips this week and evaluate them as well.
    Dave
  • JonnyMacJonnyMac Posts: 9,107
    edited 2013-08-05 10:03
    If you don't need high-speed IO they're great parts. I coded an industrial product a couple years ago that used two of them to provide chip select lines for other parts, plus a lot of extra low-speed IO. Everything done in Spin, so there was no use of another cog, nor IO pins on the Propeller chip -- just my object (which I've modified since then) and a few lines of code.
  • jmgjmg Posts: 15,173
    edited 2013-08-05 14:13
    phatallica wrote: »
    ... It seems to be a rather expensive option ($0.20 per I/O in small quanitities). By comparison, I have used Microchip's MCP23S17 with good results. It is only 16 I/O, but it is addressable so multiple may be used on the same SPI bus. Also it is <$0.10 per I/O in small quanitities.

    Maxim are always expensive.

    Another option for low cost I/O, is the AT89LP52, which comes in under 3c/pin for 36io, and it can add some data storage, and PWM/Timers.
Sign In or Register to comment.