Electronic – arduino – Why 74hc595 keep the light always on

74hc595arduino

I have a serial to parallel chip ( 74HC595-N ) which work well when I run the arduino script made for it. ( the current wiring work perfectly when I send data through the data pin )

But then I started to play around with other pin, leaving the 74HC595 circuit simply not initialized: I don't use the PIN in the 2nd script ( I use other pins ).

And I realized that when I play around with my 2nd circuit, for no apparent reason, the lights from the first circuit change state.

I though : hum, must be that weird concept of "floating voltage" I heard about… Not sure how to address that, but fair enought.

So I decide to fix the problem the lazy way and unplug the 3 cable ( latch, clock and data), great the light stopped flashing… Oh wait now ALL the lights are permanently ON. Since I'm not sending anything through the data cable, I'd like the LED to be OFF by default. I've tried to put some resistence in a attempt to create a pull up and/or pull down resistance, but it changed nothing ( possibly because I don't know what I'm doing as I don't fully understand what's going on and the details of how that chip work)… I'm just impressed I didn't blew anything.

I know you'll say it's probably a useless question and bla bla bla, but I'm still learning and most of the "project" I'm doing right now are useless anyway, so I'd like to understand why all the light are on, and how to fix this problem. Kind of a side quest in my electronic adventure.

I drew a diagram from CircuitLab. ( Ps.: I know I kind of wired the 7segments display a weird way, I just figured out how to count the PIN order recently … did I told you I was beginning ? )
enter image description here

Best Answer

The problem here seems to be that you're assuming that the outputs of the 74HC595 will all be low upon power-up.

This is not a valid assumption. The datasheet makes no guarantee about the state of the outputs upon power-up. They could be high, they could be low, they could vary from part to part, they even could be a mixture of high and low on different pins.

Basically, the only way to ensure that the 595's output pins are in a known state when you power it up is to have a circuit that triggers the MR input when the system is powered, and continues triggering the MR pin until the 5V power is stable.


As an aside, I actually was recently working on a project where I needed some additional outputs, and I specifically didn't use a 75HC595 for exactly this reason - you cannot guarantee it's power-on state.