Major Gate Problem

Status
Not open for further replies.

h3lladvocate

New Member
So, today I went out and bought 5 gates, AND, OR, NOT, XOR, and NAND, all of which being quad, 2-input positive gates. Now, im really new to electronics. I've taken E&M physics so i know al' the stuff behind circuitry, but this is my first "project". Anyways, from what i've seen online, which hasn't been much help, ive connected the gates correctly, but i cant get any of the gates to work properly. For instance, my OR gate behaves like this

A B O
0 0 1
1 0 1
0 1 1
1 1 1

so no matter what, the OR gate outputs 1... which is bad. I get this similar results with all my gates, not the exact same, but behaving against the truth table. So i guess my question is this. Can someone either A, tell me how to use the gate properly, because i might not me... or B, tell me if my parts are just faulty and what to do. The parts are NTE74LS series, so NTE is the manufacturer, and i got it from Fry's, if you know what that is. Please help!
 
you seem to be getting a 1 as a output no matter what, dont you? have you put pulldown resistors on all your inputs?
 
Im not sure what those are. What im doing, at least for the OR, is just connecting the Vcc to +5 V, the ground to 0V and my LED to the output, so nothing at all is going in to the input. When i do this, the light goes on, but i think it is supposed to be off. If i need to put pull down resistors, then please explain what those are, im still new at all this.
 
you do need pulldown resistors on all your inputs (10k) what these do is stop any static from entering the inputs (static will cause your ic to be random) and giving a false reading, these pulldown resistors go from all your inputs to ground, once you do that, they all should work fine.

just remember with the OR gate that only two inputs of 1 = 1 so thats high and high = output high any other combo and you get a output of 0 (low)
 
Last edited:
Ok, well i tried that(i didnt have 10k resistors so i used 33k) and i still have a 1 output for my OR even thought my inputs should be both 0.
 
Forget the pull down resistors. The 74LS seies is TTL. A pull down resistor of will do nothing with TTL unless it is very low, ie. a few Ohms.

With TTL, an open input is equivalent to a high ie. a 1 in positive logic.

So how are you defining the inputs? ie. are you connecting them to +5 V for a High (H) and 0 V for a Low (L)?

Also, how is the LED connected to the output?

Is it between the output and 0 V or the output and +5 V?

Truth tables for gates and other types of digital logic are best written with H and L rather than 1 & 0 since in positive logic, H = 1 but in negative logic, H = 0.

The attachment may help you.
 

Attachments

  • Gating.gif
    7.8 KB · Views: 166
33k might be to much resistance,if you have anything under 10k that is close, try that, also you have to use pulldown resistors on all you unused inputs as well, you can leave the outputs they dont need to be connected to anything
 
Last edited:
For testing the OR, im actually connecting nothing at all to the inputs. The LED it connected with the anode end connected to the output, and the cathode to 0 V. I can try actually giving the input 0 V instead of no current at all.
 
well ive only ever used cmos 4000 series not sure about 74LS, what made you go for 74LS anyway? just curious
 
h3lladvocate said:
For testing the OR, im actually connecting nothing at all to the inputs. The LED it connected with the anode end connected to the output, and the cathode to 0 V. I can try actually giving the input 0 V instead of no current at all.
As I said previously, in the case of TTL, if the inputs are open, it is equivalent to conncting them to a High.

TTL outputs do not source much current. They are designed to sink current.

TTL inputs need to be connected to 0 V to make them Low.

How did you set the inouts to 1 & 0 as in the truth table you quoted in your first post?
 
ljcox said:
How did you set the inouts to 1 & 0 as in the truth table you quoted in your first post?

(inouts)? do you mean the inputs, he left them unconnected equalling an output of 1, is that what you ment
 
shaneshane1 said:
(inouts)? do you mean the inputs, he left them unconnected equalling an output of 1, is that what you ment
hi,
As Len keeps telling you, if a 74 series input is left 'open' , disconnected it will assume a 'HIGH' logical '1' state.

If the gate is an 'NAND' , then output of the gate should be LOW logical '0'

If the gate is an 'AND' , then output of the gate should be HIGH logical '1'

Pulldown resistors on the 74 series are NOT normally used as they would have to be a very low resistance value.
 
Last edited:
h3lladvocate said:
For testing the OR, im actually connecting nothing at all to the inputs. The LED it connected with the anode end connected to the output, and the cathode to 0 V. I can try actually giving the input 0 V instead of no current at all.

Howdy,

You're not doing much testing if you're never manipulating the inputs! Also, many such logic gates cannot source the required current to drive an LED directly, as you're doing it. Many can sink it (meaning tying the cathode to the output, and the anode to Vcc), but not source it. You need to look at the datasheets for the respective parts you're using.

As the previous fellow said, open inputs on TTL are usually defined as High. (Unused inputs float at threshold, meaning they usually simulate H.) So, you're getting exactly what you should be: with two open inputs (H), you get H on the output, and (apparently) an illuminated LED. So, when you say you can give an input "0V instead of no current at all," you're misleading yourself. No current in this case means H. So, for real testing, tie the respective inputs to either GND or Vcc; don't leave 'em floating. And finally, once you're done testing and you finally build something, tie all unused inputs to Vcc through a resistor, 3.3k is good. (That is, a pullup, not a pulldown, as previously suggested.)

Regarding the LED, I've looked up a 74LS32, which is likely the OR gate you're using. It can source less than 1mA, and sink 8mA. These values are likely the same for the other gates. (So, I don't know how you're getting your LED to light given it's hooked up the way you say!) Connect the LED with the cathode to the output, and a 330R resistor in series with the anode to Vcc. That way you won't damage your outputs by drawing too much current. But, realize that an illuminated LED will now indicate a Low.

If it must indicate a High, you ought to add a buffer to the output of each gate you test, like a 74LS37, and have it drive the LED. Then it'll indicate a High. Do this by tying the LED cathode to the buffer output, and use a resistor in series with the anode to Vcc, between 150-270R, depending on how bright you want it. The '37 can sink 24mA...

Good luck,
Corey
 
ljcox said:
How did you set the inouts to 1 & 0 as in the truth table you quoted in your first post?


I think what he was doing was applying +V to an input and leaving the other input open assuming that it would be 0 unconnected to anything, but in fact it was always high.
 
shaneshane1 said:
(inouts)? do you mean the inputs, he left them unconnected equalling an output of 1, is that what you ment
Yes, I meant inputs. The power went off last night while I was doing an edit.
 
Ok, thanks, i got the gates working now. Didn't know that no input would mean a high input. But only one thing concerns me now. Everyone says that a high output shouldn't be able to drive an LED, yet when i get a high output, my LED lights on. I don't know if i really should be concerned with this or not.
 
well as i said in my other post i dont know much on the subject of these types of ic's, but if the led is lit, it might not be lit bright inuf, you might have to use a transistor to get it working properly, and i dont think you want to do that?

I use CMOS 4000 Series ic's, you can use a small amount or current to activate the inputs, and you get a more than high inuf output for your LED.
 
What is the part number of the OR gate he was testing?
Is it LS TTL or is it Cmos?
It might even be an old original TTL. DTL? RTL?

You will see an LED light when an LS TTL output drives it high with 1mA. It will be very dim.
 
If you use CMOS, the inputs (including unused ones) must be either high or low. They must not be left open.

If you are getting enough current from the gate to light the LED, then don't worry about it.
 
audioguru said:
What is the part number of the OR gate he was testing?
Is it LS TTL or is it Cmos?
It might even be an old original TTL. DTL? RTL?

You will see an LED light when an LS TTL output drives it high with 1mA. It will be very dim.
Audio,
He said at the outset that he's using 74LS.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…