Shop OBEX P1 Docs P2 Docs Learn Events
Drive 74HC595 with only one pin? — Parallax Forums

Drive 74HC595 with only one pin?

CuriousOneCuriousOne Posts: 931
edited 2015-01-18 04:05 in BASIC Stamp
Hello. I want to do a complex led scrolling marque using basic stamp, so a lot of 74HC595 -s will be involved (I know and I don't want to use MAX7219, as this is educational project). Is it possible somehow to drive 74HC595 with only one pin, without need for CLK/CS pins? Just one pulse come in - output 1 get enabled, next pulse come in - output 2 got enabled and so on, in loop.

Comments

  • wmosscropwmosscrop Posts: 409
    edited 2015-01-16 05:46
    CuriousOne wrote: »
    Hello. I want to do a complex led scrolling marque using basic stamp, so a lot of 74HC595 -s will be involved (I know and I don't want to use MAX7219, as this is educational project). Is it possible somehow to drive 74HC595 with only one pin, without need for CLK/CS pins? Just one pulse come in - output 1 get enabled, next pulse come in - output 2 got enabled and so on, in loop.

    CuriousOne,

    The answer is no. You're wanting to use a single pin for both data and clock signals. Although some devices allow this ("one-wire protocol") the 74HC595 is not one of them.

    The data bits are clocked in on the rising (low-to-high) transition of the shift register clock signal, rather than as different durations of signal high or low time (for example, a 20us pulse for a zero and a 40us pulse for a one).

    Walter
  • CuriousOneCuriousOne Posts: 931
    edited 2015-01-16 05:58
    Ok, any other IC that can do the thing?

    And I don't meant to use different duration. I see it like this:

    INPUT HIGH=OUTPUT 1 HIGH
    INPUT LOW=OUTPUT 1 LOW
    INPUT HIGH=OUTPUT 2 HIGH
    INPUT LOW=OUTPUT 2 LOW
    INPUT HIGH=OUTPUT 3 HIGH

    and so on.
  • tonyp12tonyp12 Posts: 1,951
    edited 2015-01-16 09:16
    Yes it's possible, but the last bit will always be zero so you can only get 7 (or 15 with two 595's or 23 with three 595's)
    As the Prop can do timings in a separate cog without any interruption it's not to hard, Not sure about the Basic stamp (can you turn off any interrupts?)
    You simple use two RC filters and then you do 90%+ high state on clock pin most of the time, so the data will not be below 2.7V if you want a 1 and latch pins will not see an acceptable rising edge.
    I got the idea from,
    http://www.romanblack.com/shift1.htm
    shift1b.gif
  • PublisonPublison Posts: 12,366
    edited 2015-01-16 09:33
    Thanks tony for responding. I was trying to find the link that you provided.
  • CuriousOneCuriousOne Posts: 931
    edited 2015-01-16 21:58
    Here's the truth table for logic I need:

    timetable.jpg
    916 x 570 - 93K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-01-17 00:16
    CuriousOne wrote: »
    Ok, any other IC that can do the thing?
    CuriousOne wrote: »
    Here's the truth table for logic I need:

    attachment.php?attachmentid=112853&d=1421474299

    If you're willing to use a different IC then there are lots of options. A small microcontroller could be programmed to generate your sequence with a single input pin as a trigger. An inexpensive Arduino clone would be one of many possible inexpensive solutions.
  • CuriousOneCuriousOne Posts: 931
    edited 2015-01-17 04:26
    You know, when I was young, we were solving same problem using 7400 (or 555), 7490, 74154 chips. I tought that chip develompent went a bit forward during these years. Seems like I'm wrong?
  • tonyp12tonyp12 Posts: 1,951
    edited 2015-01-17 09:01
    Can you spare 3 Stamp Pins?
    If so then the HC238 is what you need (It's like a HC138 but active high output)
    Though there is no state when all off, so you can only use 7bits unless you use a 4th Stamp pin for CS1
    http://www.mouser.com/Search/Refine.aspx?Keyword=HC238&Ns=Pricing%7c0&FS=True

    Could add a 4bit counter going it to HC238 if you just want to count single pin pulses.
    You would have to connect HC238's CS1 to main clock pulse as your table shows that when low the output should be off.

    2nd Options would be to use a single HC164
    To make your own overbeck counter/ring counter as I can not find a IC that does that.
    Stamp does one short pulse followed by 8 long clock pulses
    wired up like this: http://m.eet.com/media/1128149/12116-figure_1.pdf
    But HC164 does NOT have output enable, so off when clock is low you could do a low-side master Nmosfet (using same clk) on what I take is 8LEDs?

    shift1.gif
  • CuriousOneCuriousOne Posts: 931
    edited 2015-01-18 04:05
    Technically I can spare 3 pins. I can even use another BS2 as sequence generator, but I want simple solution. If going to use ASICs, I can use MAX7219 or MAX6969, to drive 64 or 128 leds. I will check HC164, thanks.
Sign In or Register to comment.