Shop OBEX P1 Docs P2 Docs Learn Events
I/O Expanders — Parallax Forums

I/O Expanders

txmarshtxmarsh Posts: 58
edited 2010-08-11 14:36 in Propeller 1
I need 64 output and 64 inputs on my propeller project. I have searched the forum and found some great threads regarding I/O Expanders... but these threads all appear to be at least 2 years old (unless I missed one).
Are the 8255, 74HC595, etc. still the best options? I would prefer DIP based chips since surface mount is hard for me to do.
Thanks so much.
Tim

Comments

  • T ChapT Chap Posts: 4,223
    edited 2010-08-10 22:23
    Hi Tim. I use PCF8575(16 i/0) and 8574 (8 i/o) regularly and they are easy to use. You would have enough addresses(8 total devices on one I2C buss=128 total i/0) to get 64 inputs + 64 outputs. For outputs, you will need pullups to provide current. For inputs, be sure to read the manual to set the devices first to outputs prior to setting them to inputs. I am not sure about the option for DIP, but check Digikey to see if they stock dips. If not, these chips are very easy to solder by hand as SMT.
  • Heater.Heater. Posts: 21,230
    edited 2010-08-10 22:46
    txmarsh: Good grief. DO NOT USE AN 8255.

    You do realise that chip came out with Intel's 8 bit micros in the late 70's. It's still managing annoy me over 30 years later. I recently found it's used in some hardware my company was deploying. Despite being in a well shielded industrial box with shielded cables it is still flipping out when subject to electrical noise in it's operating environment. All outputs suddenly get reset to inputs.

    As a result I have also been pondering the best way to get lots of I/O for a Prop. My conclusion is that the best I/O expander for a Prop is, wait for it, another Prop.

    Yes, use another Prop or two just for the I/O. They are not so expensive, they are rugged, they have high current drive. You can program any individual pin to be IN, or OUT, or a open source or open drain driver.

    You can add some little intelligence to your I/O subsystem as a bonus.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-08-11 02:42
    I agree with Heater. 8255s are wierd in their port allocation, and reset all sorts of things if you try to change modes on the fly. They only give a couple of mAs for io/outs too.
  • JavalinJavalin Posts: 892
    edited 2010-08-11 03:31
    use the MCP32016 - example code in my i2c object in the obex. Great little chip.

    James
  • blittledblittled Posts: 681
    edited 2010-08-11 04:19
    There are 2 good 16 bit expanders, MCP23S17 (spi interface) and MCP23O17 (i2c interface)
  • RaymanRayman Posts: 14,889
    edited 2010-08-11 05:52
  • txmarshtxmarsh Posts: 58
    edited 2010-08-11 06:32
    Thanks for all the ideas...

    I like the idea of using multiple propellers... is there a good way to allow propeller no. 1 to interface with IO physically connected to propeller no. 2?

    thanks again!

    tim
  • Clock LoopClock Loop Posts: 2,069
    edited 2010-08-11 07:00
    I had this same issue with my black box sequencer design.

    After some discussion here, the best solution was to use another prop chip because the overhead of trying to deal what that many I/O expanders, not to mention the processing of the I/O's...

    I quickly found out that if I didn't use props for my expansion I would have run out of COGS in collecting and processing all the data from my I/O's

    I designed it so I had a master prop that controlled 3 other props, this master prop also programmed the other 3 props, and my master prop is the only one that has the eeprom.

    The props communicate at 250kbps using the OBEX object "full duplex serial"

    Link
    http://forums.parallaxinc.com/forums/default.aspx?f=21&m=376422
  • pjvpjv Posts: 1,903
    edited 2010-08-11 11:16
    Hi All;

    Don't forget the SX48 and SX52. You can have SPI or I2C without any external components at 4MHz, or 50 MHz with a resonator (and greater power consumption).

    Cheers,

    Peter (pjv)
  • txmarshtxmarsh Posts: 58
    edited 2010-08-11 14:32
    Thanks everyone!

    A special thanks to clock loop... I love it when people post schematics!
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-08-11 14:36
    The simplest is using multiple props. You will require 5 props and 1 eeprom. Do not share the xtal as I have seen in some threads. If you want a single xtal use the 74LCV1G04X IIRC - it's an xtal driver chip or an oscillator, or use the master prop to provide the clock to the others.

    The 4 slave props can be simply programmed and use a serial protocol to talk to them or you can get really cunning and use a 32bit protocol as ~8MBs

    You can also make an 8bit bus and use the 74LVC573s which are transparent latches but you will have a lot of wiring. For outputs use latch mode and for inputs use them transparently by en/disabling -OE. However, you will require 8 for output and 8 for input, so 16 x 20pin chips and 16 I/O prop pins to drive them (total =24pins).
Sign In or Register to comment.