Shop OBEX P1 Docs P2 Docs Learn Events
Suggested chips for input expanding ? — Parallax Forums

Suggested chips for input expanding ?

BTXBTX Posts: 674
edited 2009-01-24 12:31 in Propeller 1
Hi all

Have you some suggests, for the best chips for expand inputs, to a propeller system.
Thanks in advance.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.

Alberto.

Comments

  • AleAle Posts: 2,363
    edited 2009-01-23 13:55
    There are some I/O expanders with I2C bus from microchip. Seem quite full featured. Depending what you need as inputs we may be able to advise you better...

    Saludos,

    Ale

    the ones you get here: http://www.microchip.com/ParamChartSearch/chart.aspx?mid=11&lang=en&branchID=11034
  • BTXBTX Posts: 674
    edited 2009-01-23 14:06
    Hola Ale !!

    What you suggested looks good, also I could use a simple couple of HC165's, but what could be the advantages/disavantages of each of them ?
    I only need to expand inputs, 32 I/O are getting short for me usually, also, I could use a dedicated COG for that, no problems.
    Expanding 16 inputs from two or three pins are good enough for me, but which is the best, or the "nice" way to do it.

    Chagracia !!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • LeonLeon Posts: 7,620
    edited 2009-01-23 14:29
    HC165 uses less code and is faster. NXP makes some nice I2C expander chips.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • RinksCustomsRinksCustoms Posts: 531
    edited 2009-01-23 14:30
    how about using the super i/o chip for comms on common motherboards?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quicker answers in the #propeller chat channel on freenode.net. Don't know squat about IRC? Download Pigin! So easy a caveman could do it...
    http://folding.stanford.edu/ - Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • kwinnkwinn Posts: 8,697
    edited 2009-01-23 14:33
    If all you need to do is read the state of input switches or something similar then HC165's are a good way to go. Simple to wire, only 3 prop pins required, expandable to any number of bits, can be read at a high clock rate, cheap and readily available. The disadvantage is lack of flexibility. The HC165 for example is only good for input, and is totally dependent on the prop to store and read the data.
    The i/o expander chips are more flexible, usually allow a mix of input and output, may have more i/o pins per chip. They may also be able to latch a fast input signal or trigger on a pulse edge so the signal is not missed. The down side is that they are more complex to use, more expensive, and harder to source, and usually slower than the logic chips.
  • virtuPICvirtuPIC Posts: 193
    edited 2009-01-23 14:41
    Well, the MCP23016 / MCP23017 are interfaced via I2C / SPI. This means you get slower communication with higher programming overhead. On the other hand you only need two or three data lines between the prop and the peripheral. And the have three binary address bits which means you can address 8 chips and get up to 128 inputs selectable by software without further hardware. They are a bit more expensive than the '165 but Microchip offers samples.

    If you just want to build a small system which runs without great programming take the '165. If you want a fast system take the '165. If you want to be flexible regarding input or output that the MCP230XX. If you need many inputs take the MCP230XX.

    I2C? SPI? Your choice! Have not yet looked into their advantages or shortcomings.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Airspace V - international hangar flying!
    www.airspace-v.com/ggadgets for tools & toys
  • BTXBTX Posts: 674
    edited 2009-01-23 14:48
    Thank you all guys !!
    Answers were very clear & great !! .

    Due I will only need about 16-24 inputs more, relative fast, low price, & easy to find, seems to be so the HC165 the perfect choice for my situation.

    Thank you all again !!.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • AleAle Posts: 2,363
    edited 2009-01-23 16:06
    There is another possibility I used recently (for a small 6 key keyboard plus rotary encoder, it transmits via a synchronous protocol using only 1 pin): Using an ATMega48 as I/O expander. It has 20 I/O and you could use the I2C interface (8+8+6 minus 2 for I2C). It is cheap (some 1.2 or so Euro) easy to program and easily available while de I/Os expanders from NXP or Microchip may not be that available. Nothing beats a good old '165 in cheapness when only inputs are needed.
  • Mark SwannMark Swann Posts: 124
    edited 2009-01-23 18:24
    BTX said...
    Hi all

    Have you some suggests, for the best chips for expand inputs, to a propeller system.
    Thanks in advance.

    Take a look at http://www.brilldea.com/product_uoledioc.html.
    Timothy is using the PCA9555 in the carrier board shown in the link.
  • Chuck RiceChuck Rice Posts: 210
    edited 2009-01-23 18:46
    BTX said...
    Hi all

    Have you some suggests, for the best chips for expand inputs, to a propeller system.
    Thanks in advance.

    I just wired up a MCP23017. So far, I am quite impressed. Quite easy to use.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2009-01-23 22:27
    PCA9555 and PCA9553 are the I2C GPIO expander chips that I chose to use when I need more I/O. I usually write an I2C device wrapper around the I2C driver. The device wrapper is able to receive comamnds, via a buffer, from the other cogs for controlling the devices on the I2C such as memory or GPIO. There is a driver on the uOLED-IOC page for using the PCA9555, but it isn't exactly setup as I just described.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto for SunSPOT, BitScope
    www.tdswieter.com
  • ConeheadConehead Posts: 12
    edited 2009-01-23 22:57
    I recently used a PIC18F2221 to add I/O.· I connected it to the Prop using the PIC's SPI port.· Works like a charm and allows me to put some intelligence into it later on.· Plus, I was able to use PICBASIC PRO.
  • BTXBTX Posts: 674
    edited 2009-01-24 12:31
    Thx guys.
    So seems to be PCA, MCP, HC165, & some microcontrolled possibilities.
    Now so, don´t forget another propeller solution acting as I/O, serial port or I2C controlled, programable, flexible, but not cheap.

    Anyway, I prefeer hardware solutions instead microcontrolled solutions (less headaches).

    As I said before HC165, did win for me this time.
    Thx all !!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
Sign In or Register to comment.