Array
(
    [content] => 
    [params] => Array
        (
            [0] => /forum/index.php?threads/and-gate-stays-open.14743/
        )

    [addOns] => Array
        (
            [DL6/MLTP] => 13
            [Hampel/TimeZoneDebug] => 1000070
            [SV/ChangePostDate] => 2010200
            [SemiWiki/Newsletter] => 1000010
            [SemiWiki/WPMenu] => 1000010
            [SemiWiki/XPressExtend] => 1000010
            [ThemeHouse/XLink] => 1000970
            [ThemeHouse/XPress] => 1010570
            [XF] => 2021370
            [XFI] => 1050270
        )

    [wordpress] => /var/www/html
)

AND Gate Stays Open

Deion

New member
I have a very simple circuit on a breadboard with two push-button switches, an AND gate (74LS08), and an LED. I have the two switches hooked up to pins 1 and 2, while the LED goes from 3 to ground. Pin 14 is given 5 volts, while pin 7 goes to ground.

I'm just trying to test to see if the AND gate works and so far it seems as though it doesn't. As soon as I plug in 5 volts to pin 14, I get current through all the output pins, 3, 6, 10, and 13, regardless of what's going on with their respective input pins, even if pin 7 isn't grounded.
1VSPj.png


Obviously, the LED should only turn on when both switches are switched on, but once 5 volts is supplied to pin 14, it doesn't matter what I do to the buttons. I've tried a couple of the same AND gates from the pack, as well as some OR gates, and they all do it
 
Try tying the inputs to a valid low signal. You are floating the inputs from what I can tell. So give it a proper logic low at the input pins to make sure they are not drifting high. Also you should probably add a resistor to the output so that you don't burn them out.
 
Put pull down resistors on the inputs so they don't float. +1 for adding a current limit resistor for the LED. It's unlikely that you'll burn them out because LSTTL can't source enough current to damage the LED, but it always makes us do a double take because it's not a good practice. You might damage the IC.

1633806420882.png


EDIT: If you measure the voltage on the input that isn't connected to the supply, you'll probably find that it's around 1.7V (that's what I recall it being for TTL, don't recall if LSTTL is different) which isn't a valid LOW or HIGH:
1633806943564.png
 
Last edited:
Looking at that schematic I would expect unconnected inputs to float high. If there isn’t any current flowing through one of the diodes to pull down the 20k resister then the input will be pulled up to a diode drop below the rail. That’s a solid high level.
 
Looking at the schematic, I'd expect a floating input to be 2 diode drops above ground; so 1.4V. What I measured was around 2V. That would seem to satisfy the minimum voltage level for a HIGH input, but noise can easily be coupled to the floating inputs. Play it safe and never let inputs float.

I also noticed that I posted specs for S08. LS08 below
1633913172977.png
 
Back
Top