Shop OBEX P1 Docs P2 Docs Learn Events
74HC595 and 74HC597 questions — Parallax Forums

74HC595 and 74HC597 questions

ArchiverArchiver Posts: 46,084
edited 2000-05-02 00:52 in General Discussion
I'm thinking about using 74HC595's and 597's to expand the number of
input pins on my Stamp, and provide some protection from damaging its
pins: The chips are 50 cents to replace, the stamp isn't.

I also want to use a pair of them to make a simple two digit LED
display for diagnostics, and I'm told that I'll need one for each
digit, which makes sense, but I'm also told that no matter how many i
have used, i'll only need 3 IO pins from the Stamp, and i cant figure
out how.

electronguy wrote:

>I am putting together a 3 LED display right now and am using 74hc595
>shift registers. You use one chip per LED but only 3 BS2 lines even
>if you add 20 digits! I like all the flexibility these give you.
>One thing that I did was to program it so that all the segments were
>on the one side and DP on the other. You will understand once you
>look at the documentation.

>www.phanderson.com has all the info in there stamp section on doing
>this.

I can't find anything at phanderson on this topic, so does anyone
know what i'm missing?

-Chris

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-04-30 21:25
    At 07:00 PM 4/30/00 +0000, Chris wrote:
    >I'm thinking about using 74HC595's and 597's to expand the number of
    >input pins on my Stamp, and provide some protection from damaging its
    >pins: The chips are 50 cents to replace, the stamp isn't.
    >
    >I also want to use a pair of them to make a simple two digit LED
    >display for diagnostics, and I'm told that I'll need one for each
    >digit, which makes sense, but I'm also told that no matter how many i
    >have used, i'll only need 3 IO pins from the Stamp, and i cant figure
    >out how.

    Its really easy! Each chip has a pin used to cascade to the next. Lets
    talk about hc595 for now. Connect all the Clock pins together and to the
    stamp. Connect all the latch strobe pins together and to the
    stamp. Connect the data IN of the 1st 'hc595 to the stamp. Connect the
    data OUT of the 1st hc595 to the data IN of the next hc595. Keep adding
    more hc595s to the end as you need them.

    It gets a tiny bit more complicated if you want both inputs and outputs on
    the same 3 pins - but not by much. You will need a small resistor - 2k2 or
    so is fine. Connect the clock and latch pins you already have to the Clock
    and Parallel Enable (P/S) on the hc597s. Connect the data IN of the 1st
    hc597 to GND, connect its data OUT to the data IN of the next, etc. When
    you get to the last hc597, connect its data OUT to the data line going to
    the stamp THRU the 2k2 resistor. In other words, there is a 2k2 resistor
    between the data out of the last hc597 and the stamp.

    The sequence is: turn the stamp data pin to input, send out as many clock
    pulses as you have input bits and read the data from the data pin. When
    you have gotten all the input data bits, turn the stamp data pin to an
    output and send as many clock and data bita as you have outputs. Then
    pulse the latch strobe pin - this updates both the input and output
    shift registers at the same time.

    dwayne



    Dwayne Reid <dwayner@p...>
    Trinity Electronics Systems Ltd Edmonton, AB, CANADA
    (780) 489-3199 voice (780) 487-6397 fax

    Celebrating 16 years of Engineering Innovation (1984 - 2000)

    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    Do NOT send unsolicited commercial email to this email address.
    This message neither grants consent to receive unsolicited
    commercial email nor is intended to solicit commercial email.
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-01 00:40
    Dwayne,

    Ok, thanks a lot, i get it now. That is simple.

    -Chris

    --- In basicstamps@egroups.com, Dwayne Reid <dwayner@p...> wrote:

    > Its really easy! Each chip has a pin used to cascade to the next.
    >Lets talk about hc595 for now. Connect all the Clock pins together
    >and to the stamp. Connect all the latch strobe pins together and to
    >the stamp. Connect the data IN of the 1st 'hc595 to the stamp.
    >Connect the data OUT of the 1st hc595 to the data IN of the next
    >hc595. Keep adding more hc595s to the end as you need them.

    >It gets a tiny bit more complicated if you want both inputs and
    >outputs on the same 3 pins - but not by much. You will need a small
    >resistor - 2k2 or so is fine. Connect the clock and latch pins you
    >already have to the Clock and Parallel Enable (P/S) on the hc597s.
    >Connect the data IN of the 1st hc597 to GND, connect its data OUT to
    >the data IN of the next, etc. When you get to the last hc597,
    >connect its data OUT to the data line going to the stamp THRU the2k2
    >resistor. In other words, there is a 2k2 resistor between the data
    >out of the last hc597 and the stamp.
    >
    >The sequence is: turn the stamp data pin to input, send out as many
    >clock pulses as you have input bits and read the data from the data
    >pin. When you have gotten all the input data bits, turn the stamp
    >data pin to an output and send as many clock and data bita as you
    >have outputs. Then pulse the latch strobe pin - this updates both
    >the input and output shift registers at the same time.
    >
    > dwayne
    >
    >
    >
    > Dwayne Reid <dwayner@p...>
    > Trinity Electronics Systems Ltd Edmonton, AB, CANADA
    > (780) 489-3199 voice (780) 487-6397 fax
    >
    > Celebrating 16 years of Engineering Innovation (1984 - 2000)
    >
    > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
    > Do NOT send unsolicited commercial email to this email address.
    > This message neither grants consent to receive unsolicited
    > commercial email nor is intended to solicit commercial email.
  • ArchiverArchiver Posts: 46,084
    edited 2000-05-02 00:52
    I took a look at the phanderson.com site and was unable to find any details
    for using the hc595 with the BS2. He does have info on using it with the
    BasicX. I guess I'm getting senile [noparse]:)[/noparse] I could have sworn he had some info on
    that, but after looking around a bit I found the code and info for the BS2
    right in the BS2 Manual. It is the application notes dealing with serin and
    serout. Page 353 version 1.9.
    Sorry to misdirect you.
Sign In or Register to comment.