Shop OBEX P1 Docs P2 Docs Learn Events
I/O increase in the Spinneret Web server — Parallax Forums

I/O increase in the Spinneret Web server

JAGOJAGO Posts: 49
edited 2011-03-22 09:50 in Accessories
Hi Friends,

I'm starting to work with the spinneret, and i have a cuestion about the GPIO, spinneret only have 6 GPIO but i need more because i want control 20 leds through the web... So, what would be the best way to increase the GPIO in the spinneret???

Many thanks for all.... gretings

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2011-03-09 12:30
    Hi friend!

    If you don't need the I/O lines for anything else, you can take five of them and run thm into a pair of 74154 type TTL 4:16 decoders. Put the "bottom" four bits into the two decoders in parallel and then use the 5th "bit" to enable the lower (0-15) bits or the upper (16-31) bits. You may need to play with the upper bit as to whether HIGH or LOW enables the encoders....I forget, it's been a while.

    This is sort of brute force digital stuff but then, sometimes that's all ya got!

    Curious to see any other answers.

    Take care,

    Rick
  • Coder96Coder96 Posts: 42
    edited 2011-03-09 13:07
    If all you want to do is control some leds. A few 74HC59 will work.
  • JAGOJAGO Posts: 49
    edited 2011-03-09 13:19
    Hi friends,

    many thanks for your answers, i try with the IC's... I thinked in program another propeller to wait comands and activate the pins, in this case i'll have 30 i/o for control... May be its a good option, what do you think about this?

    Many thanks, my friends... Gretings
  • JAGOJAGO Posts: 49
    edited 2011-03-10 06:58
    Thanks for your answer rick,

    I think that you idea will work, and is a very low cost solution for control... did you use this circuit?? (74154) in any similar aplication?? because i have another cuestion, how do it for activate 5 outs at same time??

    thanks, take care

    cristian
  • mindrobotsmindrobots Posts: 6,506
    edited 2011-03-10 12:54
    I probably used it a long time ago in a previous life. :O)

    I believe you take two chips, wire the I/O pins that will be your bottom 4 "bits" to both sets of inputs and then use a 5th I/O pin to be the chip select (enable) for the 74154's. If the 5th pin is high, then one chip is selected if the 5th pin is low, then the other chip is selected.

    It's been a while with any TTL but I think something like that should work.

    Good luck!
    Have fun!

    Rick
  • JAGOJAGO Posts: 49
    edited 2011-03-10 13:16
    Hi rick,

    i understand your explanation and i'm trying the 74154 with the spinneret but my problem is... I can't activate More than 1 output in the 74154, for example, i need that one led keep energized while i'm activate and desactivate other led, understand me??? In the 74154 only activate or desactivate one output at same time... And i need activate one or two or five outputs but i need that's outputs maintain the states like a high comand in the BASIC stamps... Have any idea to do this??

    Thanks my friend...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-03-10 13:20
    A 74HC595 would be a better choice for driving multiple LEDs.

    -Phil
  • pthartmannpthartmann Posts: 27
    edited 2011-03-21 16:20
    If you're really feeling ambitious, you might get away without any additional hardware.

    You would have to charlieplex using all your pins:

    http://en.wikipedia.org/wiki/Charlieplexing

    5 pins, using the equation n*(n-1) : you could potentially control 20 LEDs. There are a number of limitations and complexities, but I thought it was worth mentioning.

    http://www.electro-tech-online.com/microcontrollers/86088-multiplex-vs-charlieplex.html
    http://hackaday.com/tag/charlieplex/
  • JAGOJAGO Posts: 49
    edited 2011-03-22 09:14
    Hi pthartmann,

    i never listened about the charlieplexing... this technique is great.. many thanks, but know i need control 40 leds because i need more ligths...
    what do you think about the program a SX chip for recive serial data from the propeller and then activate his PIN's for control... do you know any other idea??

    Many thanks for all...
  • pthartmannpthartmann Posts: 27
    edited 2011-03-22 09:50
    JAGO wrote: »
    Hi pthartmann,

    i never listened about the charlieplexing... this technique is great.. many thanks, but know i need control 40 leds because i need more ligths...
    what do you think about the program a SX chip for recive serial data from the propeller and then activate his PIN's for control... do you know any other idea??

    Many thanks for all...

    At that point, I would have to agree with a serial to parallel chip, like Phil mentioned - the 74HC595 is a good choice. The programming to shift out to each LED shouldn't be too bad.

    I'm sure there's an example for the Propeller somewhere, but I found this example for an Atmel:
    http://www.arduino.cc/en/Tutorial/ShiftOut
    If nothing else it should show you how to wire everything.

    35¢ here: http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&pa=46105&productId=46105&keyCode=WSF&CID=GMC
Sign In or Register to comment.