Shop OBEX P1 Docs P2 Docs Learn Events
Cascaded shift Registers (how many is to much) — Parallax Forums

Cascaded shift Registers (how many is to much)

sir_hacksalotsir_hacksalot Posts: 15
edited 2013-05-31 13:42 in BASIC Stamp
From Stamp works experiment 25

SW21-EX25-Mixed_IO.BS2
Mixing 595 outputs and 165 inputs

I have completed the circuit with both the 74HC595 and the 74HC165 and I love it. 4 pins = 8 in and 8 outs.
I want more
lots more

Is it possible to cascade these? I need around 64 inputs with corresponding outputs. Just like the 595 / 165 relationship. but times 8.



:cool:

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-30 20:27
    Yes, you can do 64 inputs and 64 outputs. It takes more time to shift 8 bytes of 8 bits each in and out. The SHIFTIN and SHIFTOUT statements run at about 15KHz. With 64 bits in series, that will give you about 250 readings a second. I'd recommend using 3 I/O pins for each chain of devices, 3 for the 74HC595s (Shift Clock, Load Clock, Data) and 3 for the 74HC165s (Shift Clock, Load Clock, Data). You could easily cascade 10 in each chain.
  • sir_hacksalotsir_hacksalot Posts: 15
    edited 2013-05-31 11:36
    Thats great news! Thank you.
    Unfortunately Im using the Stamp Works book to wire up the 595 and 165 and Im not sure how to wire up the additional shift registers. Can you provide a diagram?
    I should be able to handle the code.
    \
    thanks again
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-31 12:00
    Look in the Nuts & Volts Columns for examples. Also look at the datasheets for the 74HC595 and 74HC165.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-05-31 13:42
    Here's a schematic from one of the '595 objects. It gives you an idea how to daisy chain the chips together.
    *****************************************************************    74HC595 Shift Register Schematic  (from OBEX object)
    *****************************************************************    
     
            I've used Motorola's pin names in the following diagram:
                  
         ┌──────┐
     QB  ┫1•  16┣  Vcc                 
     QC  ┫2   15┣  QA                                
     QD  ┫3   14┣─────────────────────────────── ← A (SHIFT_DATA from Propeller)              
     QE  ┫4   13┣─────────────────────• Output Enable (Ground each one)            
     QF  ┫5   12┣───────────────┐     ← Latch Clock (to SHIFT_LATCH from Propeller)         
     QG  ┫6   11┣─────────────┐ │     ← Shift Clock (to SHIFT_CLOCK from Propeller)
     QH  ┫7   10┣──────────────────┐  ← RESET (to Vcc or to Propeller's Reset pin)
    gnd  ┫8    9┣───────┐ QH' │ │  │
         └──────┘       │     │ │  │   Notes:
                        │     │ │  │   • Propeller feeds data into "A" input of first stage.
         ┌──────┐       │     │ │  │   • QH' from first stage feeds into A of next stage
     QB  ┫1•  16┣  Vcc  │     │ │  │   • Tie all RESET, Latch Clock and Shift Clock pins together    
     QC  ┫2   15┣  QA   │     │ │  │   • QA - QH are data outputs: Vcc = 1, gnd = 0                  
     QD  ┫3   14┣───────┘ A   │ │  │             
     QE  ┫4   13┣─────────────│─│──│───•  Output Enable (Ground each output enable)               
     QF  ┫5   12┣─────────────│─┻──│───•  Latch Clock (to SHIFT_LATCH from Propeller)                 
     QG  ┫6   11┣─────────────┻────│───•  Shift Clock (to SHIFT_CLOCK from Propeller)
     QH  ┫7   10┣──────────────────┻───•  RESET (to Vcc or to Propeller's Reset pin)
    gnd  ┫8    9┣───────┐ Qh'
         └──────┘       │
                       to next 74HC595 Data in (pin 14)
                        or leave disconnected if last one
    
Sign In or Register to comment.