Maker Pro
Maker Pro

Shift Register 74LS166

Greetings, I am currently having a problem on getting a shift register
to work. I need to pass serial data out into a serial port with the
input data being parallel hence the 74LS166 is implemented. Having gone
through the datasheets many times and making my circuit is patched
correctly, i am still unable to get any output data. I have used an
oscilloscope to observe any changes in waveform but still nothing. I
have changed the chip 3 times juz to make sure it is not faulty but yet
no output at all. A brief description of the circuit is given below,

- The inputs of the shift registers are connected to pushbuttons.
Schmitt triggers are used as well to prevent any debouncing.

- Clock Inhibit is tied to ground.

- Shift/load pin is connected to a pushbutton as well just for testing
purposes. The logic levels of shift/load have been verified. Shift =
high, load = low

- Clock is set at 40 Hz as i need a relatively fast timing for my
application.

Am i missing something in my circuit patchup? Is the clock too fast for
the data to be shifted out? Is the clock inhibit function necessary? Or
am I missing anything that should be take note of? Please advise. Any
help wld be appreciated. Thanks in advance.

Regards
Lincoln
 
L

Luhan

Jan 1, 1970
0
- Clock Inhibit is tied to ground.

- Shift/load pin is connected to a pushbutton as well just for testing
purposes. The logic levels of shift/load have been verified. Shift =
high, load = low

- Clock is set at 40 Hz as i need a relatively fast timing for my
application.

How about the clear input? Is it tied high?

Luhan
 
How about the clear input? Is it tied high?

Luhan

The clear input is tied to a pushbutton as well. As the clear pin works
on a logic low, wat i did was to connect the pushbutton thru an
inverter so that whenever the pushbutton is pushed, it sends out a
logic low thru the inverter and clears the register.
 
Greetings, I am currently having a problem on getting a shift register
to work. I need to pass serial data out into a serial port with the
input data being parallel hence the 74LS166 is implemented. Having gone
through the datasheets many times and making my circuit is patched
correctly, i am still unable to get any output data. I have used an
oscilloscope to observe any changes in waveform but still nothing. I
have changed the chip 3 times juz to make sure it is not faulty but yet
no output at all. A brief description of the circuit is given below,

- The inputs of the shift registers are connected to pushbuttons.
Schmitt triggers are used as well to prevent any debouncing.

- Clock Inhibit is tied to ground.

- Shift/load pin is connected to a pushbutton as well just for testing
purposes. The logic levels of shift/load have been verified. Shift =
high, load = low

it seems from your last answer that you are using push buttons to drive
the logic high. TTL pulls high by default so you would need pull down
resistors on each input. Supply voltage is also critical for lsttl,
within 250mV of 5V, a decoupling capacitor (0.1uF) at the chips supply
pins is needed as well. Check your logic levels, you need less that
0.8V for low and more than 2V for high.
 
it seems from your last answer that you are using push buttons to drive
the logic high. TTL pulls high by default so you would need pull down
resistors on each input. Supply voltage is also critical for lsttl,
within 250mV of 5V, a decoupling capacitor (0.1uF) at the chips supply
pins is needed as well. Check your logic levels, you need less that
0.8V for low and more than 2V for high.

I inserted 100 ohm resistors between each pushbutton and the power
supply to prevent overloading of current into the chip. Can this be
considered as a pull down resistor as well? I have not inserted a
decoupling capacitor though. Does this mean i just to insert a
capacitor between the power supply and the supply pin of the shift
register ie. Pin 16? Does this capacitor apply to all other supply pins
of other chips as well eg. Schmitt Trigger and Inverter? Thanks.
 
I inserted 100 ohm resistors between each pushbutton and the power
supply to prevent overloading of current into the chip. Can this be
considered as a pull down resistor as well? I have not inserted a
decoupling capacitor though. Does this mean i just to insert a
capacitor between the power supply and the supply pin of the shift
register ie. Pin 16? Does this capacitor apply to all other supply pins
of other chips as well eg. Schmitt Trigger and Inverter? Thanks.

Sorry, wat i meant was I inserted 100 ohm resistors between each
pushbutton and ground, the other pin of the pushbutton goes to the
supply line. Is this considered a pull down resistor? Cheers.
 
it seems from your last answer that you are using push buttons to drive
the logic high. TTL pulls high by default so you would need pull down
resistors on each input. Supply voltage is also critical for lsttl,
within 250mV of 5V, a decoupling capacitor (0.1uF) at the chips supply
pins is needed as well. Check your logic levels, you need less that
0.8V for low and more than 2V for high.

I inserted 100 ohm resistors between each pushbutton and ground, the
other leg of the pushbutton goes to the supply line to prevent
overloading of current into the chip. Can this be considered as a pull
down resistor as well? I have not inserted a decoupling capacitor
though. Does this mean i just to insert a capacitor between the power
supply and the supply pin of the shift register ie. Pin 16? Does this
capacitor apply to all other supply pins
of other chips as well eg. Schmitt Trigger and Inverter? Thanks.
 
S

Sambo

Jan 1, 1970
0
it seems from your last answer that you are using push buttons to drive
the logic high. TTL pulls high by default so you would need pull down
resistors on each input. Supply voltage is also critical for lsttl,
within 250mV of 5V, a decoupling capacitor (0.1uF) at the chips supply
pins is needed as well. Check your logic levels, you need less that
0.8V for low and more than 2V for high.
High by default , hmm I am certain of that for vanilla and 'L', I am
starting to wonder about LS as it doesn't have the original open emitter input.
I am having problems my self with the simplest setup of LS164 after my
PIC-ls164 LCD driver wouldn't work.
With only clock pulled up and leds on BCD I have 011 after powerup.
Man I got to call the ghost busters ..... or move to the coffee table by
the window (after I clean it up from the 7 years of crad), away from my
19" monitor, 12" away right now.

Cheers.
 
J

John Fields

Jan 1, 1970
0
Sorry, wat i meant was I inserted 100 ohm resistors between each
pushbutton and ground, the other pin of the pushbutton goes to the
supply line. Is this considered a pull down resistor? Cheers.

---
OK, I see that you're hopelessly lost and that you've been given
some bad information, so let's clear that up first.

While TTL inputs do pull high by default, it's _extremely_ bad
practice to to add a pulldown resistor to get a default low and then
try to pull that input up to get a high. Look at the currents
required on the inputs to do that and you'll see why, maybe.

The correct method is to add a pullup, 4.7K or so, from the input to
Vcc and then to pull that input low when required, like this, with
S1: View in Courier.


Vcc
|
[4k7]
| | \
+----| >O-
| | /
| O
S1| O
|
GND

S1 is a SPST NO switch, so when it's not made the input of the
inverter will be high and its output low. When S1 is made, the
input will go low, so the output will go high.

Now, unless you're using alternate-action pushbuttons for the data
switches, for the purpose of this exercise it would be best if you
could use dip switches (or any kind of SPST toggles) instead of the
pushbuttons you're using now. That way, the only switch which will
need to be debounced is the LOAD/SHIFT switch, which we'll get into
next.

BTW, Which Schmitt triggers are you using?
 
S

Sambo

Jan 1, 1970
0
I inserted 100 ohm resistors between each pushbutton and ground, the
other leg of the pushbutton goes to the supply line to prevent
overloading of current into the chip. Can this be considered as a pull
down resistor as well? I have not inserted a decoupling capacitor
though. Does this mean i just to insert a capacitor between the power
supply and the supply pin of the shift register ie. Pin 16? Does this
capacitor apply to all other supply pins
of other chips as well eg. Schmitt Trigger and Inverter? Thanks.
If your data input is static (i.e.. pulled up/down with resistors ) you are
probably OK without the caps on the buttons. but usually you'd use RC between
power rails shorting the cap with a pushbutton. Better yet use inverter or driver
to sharpen the the edge when the cap is charging, before finally feeding the
intended input, that way you don't have to worry if you matched active low input
with C/button on bottom or active high with C/button on top.


What I am wondering about your circuit, how is the clock controlled. Is it a free
running oscillator? ticking while you are loading new values?
Hmmm Ok time too look at the SPEC.
????
OH, so you are having trouble loading the data?

Hmmm , clock inhibit has precedence over sh/|ld
This could become very complex circuit very fast.
Oooooh, I can see an RS flip/flop and some gates in your future, after the
loading is solved ;).
 
P

petrus bitbyter

Jan 1, 1970
0
Greetings, I am currently having a problem on getting a shift register
to work. I need to pass serial data out into a serial port with the
input data being parallel hence the 74LS166 is implemented. Having gone
through the datasheets many times and making my circuit is patched
correctly, i am still unable to get any output data. I have used an
oscilloscope to observe any changes in waveform but still nothing. I
have changed the chip 3 times juz to make sure it is not faulty but yet
no output at all. A brief description of the circuit is given below,

- The inputs of the shift registers are connected to pushbuttons.
Schmitt triggers are used as well to prevent any debouncing.

- Clock Inhibit is tied to ground.

- Shift/load pin is connected to a pushbutton as well just for testing
purposes. The logic levels of shift/load have been verified. Shift =
high, load = low

- Clock is set at 40 Hz as i need a relatively fast timing for my
application.

Am i missing something in my circuit patchup? Is the clock too fast for
the data to be shifted out? Is the clock inhibit function necessary? Or
am I missing anything that should be take note of? Please advise. Any
help wld be appreciated. Thanks in advance.

Regards
Lincoln

Lincoln,

From your description I think your main problem is lack of understanding
logic circuits in general and TTL logic in particular.

So, as for the speed, this circuits are made to handle frequencies up to
35MHz. So your 40Hz is extremely s-l-o-w. But what's slow for the circuit is
still pretty fast for you. No wonder you see nothing at the output.

To set up the circuit: Every input should be connected either directly to a
TTL output or to ground or indirectly to Vcc using a pullup resistor.
Everything between - let's say - 1k and 10k will do. If you want to use
switches they should be connected between an input and ground.

So clock inhibit connected to ground is ok, shift/load high (using a pullup
resistor) too and let's assume your 40Hz clock runs well. As all inputs are
pulled high, the serial output should be high too. Every simple multimeter
is good enough to verify. If not either the wiring or the chip is bad. Now
one simple test can easily be done: Connect the serial input pin to ground.
The output should follow almost immediately, that is to say after some (200)
milliseconds. If not etc...

Before going on, you have to know that mechanical switches always bounce.
The contacts bouncing against each other cause pulses in the milli- en
microseconds range, often for milliseconds. But these are valid signals for
circuits designed to work up to in the tenth of microseconds range. So for
debouncing, a simple Schmitt trigger often will not be enough.

Another thing you do not seem to realize, is that pushing the shift/load
button will load the register tens to hundreds of times, but the loaded
value will be shifted out in one fifth of a second when the button is
released. Nothing meaningfull to see on the oscilloscope especially if the
output also is disturbed by bounce. Only if you setup the trigger and the
time base correctly you may see some pulses flashing by.

To see the shiftregister in action, the only pushbutton you need is one
carefully debounced clock. One push should give one - and only one - pulse.
(Forget the 40Hz clock.) One other pushbutton may be used for the reset
(clear) but needs no debouncing. All other switches can better be one pole
one throw rocker switches. Keep shift/load high and push reset (clear). The
output should go low if it wasn't already. Then make (or keep) serial in
high and push clock eight times. The output should go high. Compare with the
pulse diagram on the datasheet. If the output goes high earlier your
debounce has failed. Now set the parallel input switches to some desired
pattern, pull shift/load low and push clock one time. The output should
become the same as the H-input. More pushing will change nothing as long as
you do not touch the other switches. Set shift/load to high. Pushing clock
eight times will shift out the loaded pattern, more pushing will continue to
shift out the serial input.

petrus bitbyter
 
I inserted 100 ohm resistors between each pushbutton and ground, the
other leg of the pushbutton goes to the supply line to prevent
overloading of current into the chip. Can this be considered as a pull
down resistor as well? I have not inserted a decoupling capacitor
though. Does this mean i just to insert a capacitor between the power
supply and the supply pin of the shift register ie. Pin 16? Does this
capacitor apply to all other supply pins
of other chips as well eg. Schmitt Trigger and Inverter? Thanks.

Don Lancaster wrote some good books especially for beginners. The TTL
Cookbook,
CMOS cookbook and Active Filter cookbooks are in my 'DO NOT GET RID OF'
pile along with some older National and Motorola databooks. You will
not regret getting Don's books. He explains, with minimum pain, how to
do what you're attempting. I learned a lot from Don.

BTW, Thanks Don !

Glenn Gundlach
 
J

John Fields

Jan 1, 1970
0
If your data input is static (i.e.. pulled up/down with resistors ) you are
probably OK without the caps on the buttons. but usually you'd use RC between
power rails shorting the cap with a pushbutton. Better yet use inverter or driver
to sharpen the the edge when the cap is charging, before finally feeding the
intended input, that way you don't have to worry if you matched active low input
with C/button on bottom or active high with C/button on top.


What I am wondering about your circuit, how is the clock controlled. Is it a free
running oscillator? ticking while you are loading new values?
Hmmm Ok time too look at the SPEC.

????
OH, so you are having trouble loading the data?

Hmmm , clock inhibit has precedence over sh/|ld
This could become very complex circuit very fast.

---
None of that's necessary.

With a free-running clock and a debounced switch controlling the
SHIFT/LOAD input, data will be loaded into the register and Qh will
follow H on the first rising edge of CLOCK after SHIFT/LOAD goes
low, then it'll be synchronously shifted out of Qh after SHIFT/LOAD
goes high.
 
A big thanks to all with your guidance. Am working on the circuit now
and will post results ASAP. Once again, thank you all.

Lincoln
 
Top