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.

Question about logic gates

Status
Not open for further replies.

daipapagaya

New Member
For instance, the datasheet of a TI SN74LS08 (AND Gate) says the following:

IOH High level output current = -0,4 mA max.
IOL Low level output current = 8 mA max.

What does it means?
If I want to turn on a LED when both inputs are high, how must I connect it? And which is the maximum current can I get from the IC?. The basic schematic:

**broken link removed**
 
You would do better to use a 74ls00 so you can get the 8 ma thru the led when the output is low. You then tie the led to +5 thru about a 330 ohm resistor.
Anode to +5.
 
I can't understand, right now i have a breadboard with the following circuit, exactly with the same components/values, and it is working:

**broken link removed**
 
IOH High level output current = -0,4 mA max.
IOL Low level output current = 8 mA max.
What does it means?
The gate has internal resistance which drops some voltage when current flows. So it means that the maximum source current from the output to 0V is 0.4mA without the voltage dropping to a point where the gate output is no longer 'high' (logic 1), or the max sink current is 8mA into the gate output from the +V line without the voltage rising to a point where the gate output is no longer 'low'.
If I want to turn on a LED when both inputs are high, how must I connect it?
As in your second pic, but the light will be dim because the gate sources only 0.4mA in the logic 1 state. To get it brighter you could use the gate output to drive a transistor which in turn drives the LED.
And which is the maximum current can I get from the IC?
See above. You can draw more current but only if the logic level isn't maintained.
 
Thanks, now it is more clear. But why are the leds working in the breadboard if the max output is 0,4mA?. My leds are T1-3mm standard 20mA and the logic is working fine.

In fact, I had to put 150ohm resistors because the first time the leds were burned. The schematic is exactly as the second pic.
 
Last edited:
At 0.4mA you're guaranteed to get logic 1, but you may be lucky with a particular example of a 74LS chip and get a few mA source current, albeit with an output voltage of, say, 2.5V.
 
You are using very old TTL low power logic ICs. They had a very low minimum logic high current (but some had more current than others) and a fairly high logic low current.
You are trying to light LEDs with the logic High current which might be high and might be low.
If you isnsist on using these old ICs then you should light the LEDs when the output is at a logic low, not a logic high.
 
I have altered one of your drawing to illustrate what Audio is qsaying.

However, the LED will be ON when the output is low.

So you will either need an inverter or a NAND gate to make the LED glow when both inputs are high.

I have also included a paper I wrote some years ago. It is based on one written by a work college - Norm McLeod.
 

Attachments

  • Alternative.gif
    Alternative.gif
    3.4 KB · Views: 168
  • Logic Circuits.pdf
    173.3 KB · Views: 158
Thanks a lot. Your help have been very useful, and finally i could understand the totem pole output type too, and with some tests with a multimeter now it is almost 100% clear.The datasheet did not lie xD.

After all, the thing I found confusing at first was the negative parameter IOH = -4mA.
 
Last edited:
You're welcome.

Do you understand now why the current is negative?

In short, the current is assume to flow into the IC. So a -ve current means it is flowing out.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top