Connect with us

Explain strange behavior in 74HC04

Discussion in 'General Electronics Discussion' started by batkin, Jul 25, 2013.

Scroll to continue with content
  1. batkin

    batkin

    9
    0
    Jul 23, 2013
    I got my first logic gate in the mail yesterday and started playing around with it. I set up a 5v power regulator and my new 74HC04 (6 gate hex inverter); power into power, ground into ground. I put an LED + resistor onto one of the outputs and a switch onto the related input. Everything worked as expected. When the switch was not pressed the LED lit up. When I pressed the switch the LED went dark. So then I decided to run two gates in series. I unplugged the switch and plugged a wire from the input of the LED's gate into the output of another gate on the same chip. The LED went dark as expected. That the new gate was receiving no input so it was inverting it to positive output which the second gate was inverting back to no output and turning the LED dark. Then I plugged a wire into the input of this second gate. The other end of the wire was not plugged into anything at all but to my surprise the LED lit back up as if this wire was provided positive input. Can anyone enlighten me as to what was going on?
     
  2. BobK

    BobK

    7,682
    1,688
    Jan 5, 2010
    An input must be driven either high or low, you cannot leave it unconnected, (also called floating) or it will not function correctly.

    If you want input from a switch, you would use a switch to either 5V or ground, and a resistor to the opposite, so that it is always one or the other.

    Another way to put it, no input does not mean logic 0.

    Bob
     
  3. hexreader

    hexreader

    124
    35
    Apr 21, 2011
    I agree 100% with everything BobK says.

    I will add that the wire you are attaching to the input of your gate is likely acting as an aerial and picking up mains hum of 50 or 60Hz depending on your country.

    You have created a 50 or 60Hz oscillator - albeit an unreliable and undependable one.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-