Shop OBEX P1 Docs P2 Docs Learn Events
MM74HC164 Shift-Register — Parallax Forums

MM74HC164 Shift-Register

Tricky NekroTricky Nekro Posts: 218
edited 2005-06-23 20:58 in General Discussion
Hello from Greece,

I am only asking, with this post, for some documentation about Shift-registers, generally.
If documentation (about how to programm the BS2 to have 8outputs with sacrificing only 3pins)
(Data, Clock and Clear) does exist about this shift-register ,especially, I would really be thankful of all of you, guys.
I also use two MM74HC374 Flip-Flop chips in order to double the shift-register's outputs but I am ok with them and know how to use them.

If no documentation exists, please just say...cry.gif


Thankfully,
Provas

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--

Comments

  • kb2hapkb2hap Posts: 218
    edited 2005-06-22 11:47
    Hey you can just cascade the shift registers, use the same amount of pins and double, triple, ect your outputs.

    http://www.fairchildsemi.com/ds/MM/MM74HC164.pdf

    The pdf's below are for the 74hc595's which are similar, it should at least help get you going.

    http://www.parallax.com/dl/docs/books/sw/exp/sw23a.pdf

    http://www.parallax.com/dl/docs/books/sw/exp/sw23b.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DTQ
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-22 13:02
    These·StampWorks experiment shows how to use and·cascade·the 74HC165:

    http://www.parallax.com/dl/docs/books/sw/exp/sw24a.pdf
    http://www.parallax.com/dl/docs/books/sw/exp/sw24b.pdf

    The 74HC165 is a nice compliment to the 74HC595

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • PaulPaul Posts: 263
    edited 2005-06-22 15:04
    You can actually use both the 74HC165 and 74HC595 on the same three pins from the Stamp but you·should put a 220 ohm (current limiting) resistor on the Data line of the 74HC165. This is because the '165 maybe outputing a "0" while the stamp is sending a "1" to the '595.

    Paul
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-22 16:08
    I would not share the Load and Latch pins -- use four to be safe and prevent latching unwanted data out of the 595 when you do a load on the 165.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Tricky NekroTricky Nekro Posts: 218
    edited 2005-06-22 17:47
    Thank you for your replies, they really helped me for my article.
    I hane no problem using two shift-registers·but I have the two MM74HC374 Flip-Flop chips so I have no problem with the extra pins (I do have really to use an Enable pin extra in order to use them so I have to use 5 stamp pins to have 16 output pins)
    Something more...
    Programming both these shift-register will be something like this

    Counter· VAR·· Byte
    Data_1·· CON·· 0
    Data_2·· CON·· 1
    Clock_··· CON·· 2
    Clear····· CON·· 3

    LOW Data_1
    LOW Data_2

    DO

    LOW Clear
    HIGH Clear

    FOR Counter = 1 TO 8
    TOGGLE Data_1
    TOGGLE Data_2
    HIGH Clock_
    LOW Clock_
    PAUSE·100
    NEXT
    PAUSE 3000
    LOOP

    The output will be something like this:
    10101010 3sec pause and clear(00000000) and then again 10101010... For both registers


    Anyway thanks again,smile.gif
    Thankfully, Provas

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rule your Destiny-
    --Be Good. Be Bad. Be Provas--
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-22 22:29
    Have you considered SHIFTOUT?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Tricky NekroTricky Nekro Posts: 218
    edited 2005-06-23 10:16
    To tell you the truth, not until now...

    I have some questions about the articles which were very good:

    MSBPRE and MSBFIRST are protocols of reading and writing data to shift-registers??? How can I programm a BS2 to control servos with these shift-registers without buying the PSC??? Also if I want to control Ir detector I'll use the 165 for the input pin and the 595 for senting the freq but how??? What's more when SHIFTingIN you have to PULSOUT the Load pin (PULSOUT Load, 5), what does this 5 represent???



    Thankfully, Provas

    Hello from Greece, again...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rule your Destiny-
    --Be Good. Be Bad. Be Provas--


    Post Edited (Provas) : 6/23/2005 8:58:20 PM GMT
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-06-23 14:33
    In my opinion it is not practical to attemp to control a servo through a shift register. The servo needs to be updated about 50 times a second; all the time spent attempting to udpate the shift register to create the proper output pulse would undo you. You can sense the output of any digital device with the 165 -- again, however, attempting to use the 595 for anything except simple digital outputs is just not practical.

    The manual and help file will give you all the details of the various instructions.· And, before you get too far into your project you might want to read through a couple of our Educational text books, starting with "What's A Microcontroller?" -- that will give you a good programming foundation for BASIC Stamps and let you experience (through experiments) what each command is intended to do.

    You can download any of our Parallax books from www.parallax.com

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-06-23 15:00
    ·· I agree with Jon...Sounds like a nightmare...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Don BuczynskiDon Buczynski Posts: 31
    edited 2005-06-23 19:55
    If all you·need to do is drive servos, a circuit using·a couple of·74HC238 decoders might be another alternative. You'll still need 5 stamp pins for 16 outputs.·You could use·three stamp pins for the·decoder address select inputs of both decoders and use the PULSOUT command on·seperate·stamp pin to drive·each 74HC238 enable.

    http://rocky.digikey.com/WebLib/Texas%20Instruments/Web%20data/CD74HC(T)138,238.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don Buczynski

    http://www.buczynski.com

    Post Edited (Don Buczynski) : 6/23/2005 8:01:30 PM GMT
  • Tricky NekroTricky Nekro Posts: 218
    edited 2005-06-23 20:58
    I've only setted an exable, I don't really want to do this, but things, like controlling a Line Follower and all the other IR devices really confuse me. They eat the stamp's pins like pop corn...burger.gif

    Though the compoments of "What's a microcontroller" where easy to find this was the documentation about BS2, I first read. It's a very good job which helps newbies like me understant many thing and enter the world of programming...smile.gif
    Thankfully, Provas, Greece.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Rule your Destiny-
    --Be Good. Be Bad. Be Provas--


    Post Edited (Provas) : 6/23/2005 9:02:43 PM GMT
Sign In or Register to comment.