Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Cascading Shift Registers Help

Status
Not open for further replies.

Suraj143

Active Member
Hi I’m driving 16 leds from two 74HCT164 shift registers.

From the data sheet I can only understand about the CLEAR pin (RESET).It must stay HIGH when giving CLOCK.

What is this A & B data inputs?

How can I shift LEDs one by one?
 

Attachments

  • Shift Register.JPG
    Shift Register.JPG
    36.7 KB · Views: 424
Last edited:
Hi I’m driving 16 leds from two 74HCT164 shift registers.

From the data sheet I can only understand about the CLEAR pin (RESET).It must stay HIGH when giving CLOCK.

What is this A & B data inputs?
How can I shift LEDs one by one?

Hi Suraj,
The Serial A and B are the data inputs to the shift regs.
Either A or B can be used as a 'gating' input in order to control the data input to the S/R.
example: If 'A' is high then data is entered via the 'B' serial input, if 'A' is low, then any data on 'B' will not be shifted into the S/R.
And vice versa, if 'B' is the high gate, then 'A' is the data input.

Note: if you change the state of the gating pin it clears the Qa output.

Do you follow.?
 
Last edited:
Hi Eric Thanks for the reply.

I understand a bit.

Eric to shift the bit it needs a CLOCK, but to change the state of the current bit it needs the A & B inputs state am I right?

I'm wondering why it needs two inputs (A & B) to change the state? One is more than enough.

Ex:A = HIGH the output will be HIGH
A = LOW the output will be LOW
 
Hi Eric Thanks for the reply.

I understand a bit.

Eric to shift the bit it needs a CLOCK, but to change the state of the current bit it needs the A & B inputs state am I right?

The 'A or B' input is used as a gating signal for the other serial input.
Let 'B' be low for example, then as the S/R is CLOCKED, whatever the state of 'A' the data pin, it dosnt get clocked into the S/R, as the low on 'B' has inhibited the data bit from being clocked in.

If now 'B' is high, whenever the S/R is CLOCKED, the state of the 'A' pin is shifted into the S/R.


I'm wondering why it needs two inputs (A & B) to change the state? One is more than enough.
It dosnt need two input to change the state, BUT one of the inputs has to be high in order the DATA on the other serial input to be CLOCKED in.Ex:A = HIGH the output will be HIGH
A = LOW the output will be LOW

hi suraj,

If you dont follow, I'll post a drawing..:)
 
Last edited:
Hi Eric

If now 'B' is high, whenever the S/R is CLOCKED, the state of the 'A' pin is shifted into the S/R.

Totally understood.Same as for A input.If 'A' is high, whenever the S/R is CLOCKED, the state of the 'B' pin is shifted into the S/R.

The 'A or B' input is used as a gating signal for the other serial input.
Let 'B' be low for example, then as the S/R is CLOCKED, whatever the state of 'A' the data pin, it dosnt get clocked into the S/R, as the low on 'B' has inhibited the data bit from being clocked in.

I can't understand the low side.Don't know what is inhibit (meaning).So what will happen if I let 'B' low & S/R is CLOCKED?

I'm sorry.
 
hi suraj,

A drawing to help you visualise, I have left the background 'grid' on the drawing to help in alignment.
 
Last edited:
Hi Eric I tested in a Vero board attached the circuit also.

When power up it won’t show anything. When I press the clock SW it won’t do anything.

Case 1

Now I tied the ‘B’ input to Vdd (5V) & keep the ‘A’ input floating.
When I give clock (press switch) the LEDs lights up & latch it.

But it counts in a messy way, not one by one. It means when I press the SW LED1 & LED2 both turn on. Again when I press the SW LED3, 4, 5 turns on.

I need to light up LEDs one by one without latching.
 

Attachments

  • Shift.JPG
    Shift.JPG
    13.4 KB · Views: 267
Hi Eric I tested in a Vero board attached the circuit also.

When power up it won’t show anything. When I press the clock SW it won’t do anything.

Case 1

Now I tied the ‘B’ input to Vdd (5V) & keep the ‘A’ input floating.
When I give clock (press switch) the LEDs lights up & latch it.

But it counts in a messy way, not one by one. It means when I press the SW LED1 & LED2 both turn on. Again when I press the SW LED3, 4, 5 turns on.

I need to light up LEDs one by one without latching.

hi Sarma,
The problem you are describing is classic 'switch bounce'.
The mechanical switch will give multiple CLOCK pulses.
You MUST debounce the switch output before it inputs to the S/R/

Do you follow.?
 
Last edited:
hi Sarma,
:D:D:D

The problem you are describing is classic 'switch bounce'.
The mechanical switch will give multiple CLOCK pulses.
You MUST debounce the switch output before it inputs to the S/R/

Do you follow.?

Hi Eric after denouncing will it shift nicely?

Is it ok if I place a cap between the SW? or better give clock from another IC.

Eric is it ok my diagram I'm floating the 'A' input.& tie the 'B' input to Vdd.

Is there any serial data input time? I mean to make 'B' input high do I need to make it high all the time? or just a high pulse & keep it floating & make clocks will it work like that?
 
:D:D:D



Hi Eric after denouncing will it shift nicely?
It should be OK.

Is it ok if I place a cap between the SW? or better give clock from another IC.

Eric is it ok my diagram I'm floating the 'A' input.& tie the 'B' input to Vdd.
Dont float the SERIAL DATA input, if you want to clock in '1s' tie it high or low if you want to clock in '0s'
Is there any serial data input time? I mean to make 'B' input high do I need to make it high all the time? or just a high pulse & keep it floating & make clocks will it work like that?

Hi,
Look at this drawing for debounce, any schmitt input type invertor/buffer ic will be OK.

Dont let the 'A' input float. This is the DATA state 1 or 0 thats clocked in.

Do you follow.?
 
Last edited:
Hi Eric thanks for the useful diagram.It will be all right after debouncing the SW.

I see when giving inputs from micro controller they have tied both serial inputs together to a micro controller pin.And the clock pin to another micro controller pin.

In this case first I'll set the serial inputs (Both) pins to high & give the clock pulse to clock pin & see.

I hope the outputs wont latch.After working with a one S/R I'll try to combine another one to that to make 16 outputs.
 
Hi Eric after giving clock from a microcontroller everything was ok.:)

'B' input is working for both sides, means

when 'B' is high QA output will be high & shifting.
when 'B' is low QA output will be low & shifting.

But my 'A' input is not working for 'high' side,means

when 'A' is high QA output wont be high.

I replaced 2 IC's also.But 'A' is functioning as low.

So what I did was tied both A & B inputs together & gave serial data.

Actually no need two A & B inputs.One input is enough.
 
Last edited:
hi Suraj,
Thats good.:)
Whats the project for.?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top