Need help using pull-up/pull-down resistors with 74LS04

Thread Starter

Pixel

Joined Dec 21, 2010
10
Hello.

I'm having some trouble understanding how to properly maintain input logic levels on the 74LS04 inverter chip. TI says that unused inputs must be held at VCC or GND, using a resistor. I've got that, and I think I understand why a pull-up (or pull-down) resistor is needed. Where I'm getting stuck is the term "unused input".

I want to integrate this into a MIDI module. The inverter will be configured act as a buffer. If I power the MIDI module on, but do not have it connected to a MIDI signal, will the input gates "float" even when their pins are "used" in the circuit?

Also, how do I go about integrating the pull-up resistor(s)? Do I need one for every gate, or can I tie them all to one resistor?

Is 1.2K ohm enough resistance for the pull-up?


Thank you for your help.
 

marshallf3

Joined Jul 26, 2010
2,358
Just ground the unused input pins and if you like put 10K on the unused outputs to ground.

[EDIT:] Had to re-read that. To be safe just put 10K resistors to ground on everything then you'll have no worries.
Be darn sure you've got a bypass cap very, very close to the supply voltage and ground for the IC, at least 0.1 uF and add a 10uF if it's at any distance from the power supply.
 
Last edited:

Thread Starter

Pixel

Joined Dec 21, 2010
10
Thank you for your response.

The quote I was thinking about does not mention pull-up resistors specifically.

Here's the datasheet I'm using, in case it happened not to be the same as yours.

http://focus.ti.com/lit/ds/symlink/sn74ls04.pdf

On PDF page 5, under recommended operating conditions (see Note 3)

NOTE 3: All unused inputs of the device must be held at VCC or GND to ensure proper device operation. Refer to the TI application report, Implications of Slow or Floating CMOS Inputs, literature number SCBA004.
As I said, this quote doesn't mention resistors, but it is discussed in the document mentioned in the quote, Implications of Slow or Floating CMOS Inputs.

http://focus.ti.com/lit/an/scba004c/scba004c.pdf
 

Thread Starter

Pixel

Joined Dec 21, 2010
10
Hi shteii01, and marshallf3. I apologize if I seemed a little rude just jumping in and asking questions. I never know whether to introduce myself at a forum or not.

Marshall, I didn't see your response until after I posted that last message.

I need some clarification. The input pins that ARE connected in the circuit do NOT need a pull-up resistor, only the ones that are NOT connected, right?

The ones that do need a resistor should be connected to GND, and NOT VCC. Have I got that correct?

Can I used one 10K resistor for all the applicable pins, or will I need one for each?
 

Thread Starter

Pixel

Joined Dec 21, 2010
10
I apologize if my messages above got mixed up. This forum moves quicker than most.

This is probably a really silly question, but I want to make double sure. the 74LS IS a TTL in and TTL out inverter, NO CMOS anywhere, right?
 

shteii01

Joined Feb 19, 2010
4,644
For inputs that you will not use. You do not need any resistors. Simply connect these inputs to common ground used for this circuit.
 

Thread Starter

Pixel

Joined Dec 21, 2010
10
I just read the sticky thread on bypass (decoupling) capacitors. I'm still new to electronics. I suspected IC's, especially low current logic IC's were somewhat susceptible to parasitic loads in a circuit, but I didn't think they, as a general rule, were that sensitive.

As input to the TTL, I will be using a 6N137 optocoupler. (MIDI IN current loop -> 6N137 -> SNLS7404 buffer amp -> MIDI device) I've installed a 0.1uF bypass cap, but it the only cap I used on it. Will it malfunction unless I supplement a larger cap as well?
 

marshallf3

Joined Jul 26, 2010
2,358
I normally tie unused inputs to ground, same thing as using a resistor. The unused outputs can then float freely for all it matters but I prefer sticking a resistor on them to ground just for the fun of it because in switching circuits there are a lot of transients that exist and one might be able to sneak back into the IC through a non-connected leg.

Yes, the 0.1 uF should be any general film or ceramic cap, the 10 uF should be an electrolytic but is only necessary if the supply isn't very close to the IC and it isn't switching a lot of current.
 

marshallf3

Joined Jul 26, 2010
2,358
Can I used one 10K resistor for all the applicable pins, or will I need one for each?

I'd use one on each, resistors are cheap and if you're smart, since ~10K is such a popular value, you can often find them for 0.02 cents each in volume so you should keep a large stash of them at home.
 

Thread Starter

Pixel

Joined Dec 21, 2010
10
Looks like if I'm going to learn electronics, I'm going to need plenty of resistors, 0.1uF and 10uF caps. Ordering in bulk indicates all the same specs, including thermal power. My guess is most low-current stuff shouldn't need more that 1/8 watt, but would something stronger (say 1/2 watt) be better for a wide range of applications?

Quick question. What keeps the used inputs (the ones connected to the circuit) from floating when the IC is powered, but not receiving an input signal?
 

marshallf3

Joined Jul 26, 2010
2,358
1/4W 1% resistors are the cheapest because they're the most used.

Th connected inputs of an IC are seeing something as far as an input impedance thus are safe.
 

Thread Starter

Pixel

Joined Dec 21, 2010
10
Oh, so that explains why TI said "on unused inputs" instead of "all inputs." I'd wondered about that.

If I connect a gate's input, but not it's output, will that output need to be held at ground?


The input to the 74LS04 is a signal from a 6N137 optocoupler. I placed a 0.1 uF cap to bypass the 6N137, but I did not use any other capacitor there. Will I need a second bypass cap it to function correctly and provide good input to the 74LS?
 

Thread Starter

Pixel

Joined Dec 21, 2010
10
Would 5% tolerance work on the 74LS in a pinch?

Also, if I decide to to use an input and/or output, do I need to remove the resistor from that pin, or will the input/output signal be able to override the resistor in place?
 

marshallf3

Joined Jul 26, 2010
2,358
5% would be perfectly fine and if you stick with 10K most any input signal will override it, on the outputs it probably would too but it might be better to clip the resistor out of the circuit.
 

Thread Starter

Pixel

Joined Dec 21, 2010
10
Thanks :)

As I'm still new to electronics, I'm still a little bit puzzled by what this chip is suppose to be doing. The schematic I'm working from is very similar to this one here. (dialup warning, large image)

http://users.tpg.com.au/gbtyson/wb/wbcirc.png

I'm focused on the MIDI current loop -> TTL conversion section.

Apparently, this type of interface conversion can be accomplished with more than one type of 74XX IC, as long as the circuit is set up for it. This particular version specifies the 74LS04, so that's what I chose.


The input to the 74LS04 is an optocoupler. The output of one inverter gate
is fed into the input of another, resulting in the same logic value output as input.

My understanding is that the purpose of this is to amplify the optocoupler's signal for the MIDI device to be attached at the "waveblaster connector". Can you tell me if that's right?
 
Top