# Simple TTL question

Discussion in 'Electronic Basics' started by Tim Klinger, Feb 5, 2004.

1. ### Tim KlingerGuest

I'm building something with a 7400N quad nand chip and don't
understand the way it's behaving. If I just power the chip (pin 14 to
+5, pin 7 to ground), connect pins 1 and 2 to ground, and check the
voltage at pin 3, I see something around 3V. Shouldn't I be getting
+5V?

I'm using the 7400 to debounce a pushbutton switch and running the
output to a JK flip flop to make a "stateful" switch that changes
state when the switch is pushed and released and holds that state
until it's pushed (and released) again. It's behaving unpredictably
and I can't figure out why. I'm obviously new to this so I'd

Thanks very much,
Tim Klinger

3. ### Tim KlingerGuest

OK, that's good. Will 3V or so be enough to count as "high" when
connected to the clock line of a JK flip flop?

It's a SPDT momentary switch. I'm connecting the common pole to
ground and each of the others to a nand gate and also to one end of a
2.2k resistor (the other end of which is connected to +5). I'm
connecting the output (pin 3) to the JK flip flop.

Thanks,
Tim

4. ### JeffMGuest

Even the unused gates can affect the results.
Start by tying all unused inputs to a definate logic state
(connect them to the supply voltage or to ground).

5. ### Peter BennettGuest

If it is a TTL or LSTTL flip-flop.

Bipolar TTL logic parts will consider anything above 2.4 volts as a
high, and anything below 0.8 volts as a low.

7. ### w_tomGuest

Voltages for logic levels is how logic families differ.
Conventional TTL would output a logic 1 above 2.4 volts and a
logic 0 below 0.7. Thresholds for TTL inputs defined logic
one at something less than 2.4 and a logic zero at something
above 0.7 volts. Sufficient margin for error.

But if that 2.4 volt logic one from a TTL drove a CMOS
(74C00) logic chip, then the CMOS could self destruct. CMOS
required a logic one to be higher - something more like 3.8
volts. A voltage sitting between 1 and 3 volts on a CMOS
input could cause that IC to destroy itself.

IOW verify logic one and logic zero voltage levels - both
for inputs and outputs. These are a first difference between
the many logic families.

There are logic ICs designed just for debouncing switches.
Even the famous NE555 does this function better; and using one
chip instead of two. Just some better ideas. Finish your
current design to better appreciate the suggestions.

8. ### CFoley1064Guest

I'm building something with a 7400N quad nand chip and don't
You've gotten quite a few answers on logic levels, but I'm wondering about your
using the 7400 to debounce a pushbutton switch. Unless you do it right, your
switch bounce will just pass right thru to the J-K FF, causing problems.
Here's an alternative (credit due to Mr. Don Lancaster's classic TTL Cookbook
-- view in fixed font or M\$ Notepad):

VCC
| 6.8K
.-. ___
1K | | .----------|___|----------.
| | |VCC VCC |
'-' || __ | __ |
T 10 | 470 |'---| | '---| | |
--- ___ | ___ | |& |o--. |& |o----o-------o OUT
.---o o--|___|----o---|___|-o----|__| '----|__|
|
|
GND

This will not invert, but it will work. If you need to invert, just add
another 7400 gate. The two 7400 gates with the feedback resistor form a
non-inverting schmitt trigger, which has hysteresis. That, along with the
rapidly falling and slowly rising input, will get you a clean one-transition
signal.

Of course, you could just use 1/6 of a 7414 Hex Schmitt Trigger Inverter, and
be done with it.

Don Lancaster's Guru's Lair has the classic TTL Cookbook (example above from p.
166, except he used a 7404), just about everything he's ever written, and a lot
of great advice for all -- it's worth the time.

http://www.tinaja.com/

Good luck.
Chris

9. ### CFoley1064Guest

From: (Tim Klinger)
You've gotten quite a few answers on logic levels, but I'm wondering about your
using the 7400 to debounce a pushbutton switch. Unless you do it right, your
switch bounce will just pass right thru to the J-K FF, causing problems.
Here's an alternative (credit due to Mr. Don Lancaster's classic TTL Cookbook
-- view in fixed font or M\$ Notepad):

VCC
| 6.8K
.-. ___
1K | | .----------|___|----------.
| | |VCC VCC |
'-' || __ | __ |
T 10 | 470 |'---| | '---| | |
--- ___ | ___ | |& |o--. |& |o----o-------o OUT
.---o o--|___|----o---|___|-o----|__| '----|__|
|
| | +
GND ### 100uF
---
|
|
===
GND

This will not invert, but it will work. If you need to invert, just add
another 7400 gate. The two 7400 gates with the feedback resistor form a
non-inverting schmitt trigger, which has hysteresis. That, along with the
rapidly falling and slowly rising input, will get you a clean one-transition
signal.

Of course, you could just use 1/6 of a 7414 Hex Schmitt Trigger Inverter, and
be done with it.

Don Lancaster's Guru's Lair has the classic TTL Cookbook (example above from p.
166, except he used a 7404), just about everything he's ever written, and a lot
of great advice for all -- it's worth the time.

http://www.tinaja.com/

Good luck.
Chris

10. ### JeffMGuest

Posting the same question independently to multiple groups
How is someone answering it in 1 group
(or to make corrections to incorrect responses)?

11. ### Tim KlingerGuest

It was a mistake. I didn't see my response posted so I reposted.

Thanks to all of you who responded. I understand better what's going
on. I will try the "cookbook" circuit posted and see if it improves
things...

Best,
Tim