Setting shift register (74HC595) output pins low?

I have a 7 segment display that has a common anode. I want to use my 74HC595 to control the 7 segment, but that requires setting the output pins of my 74HC595 low, instead of high.

The ShiftOut Arduino tutorial mentions that the 74HC595is tri-state: "3 states" refers to the fact that you can set the output pins as either high, low or "high impedance." If I wire the 8 output pins from my shift register to the pins for my 7 segment I just need to take the pins "low" and each segment will light up.

I don't know how to get the output pins of my shift register to go low. When I enable the output pins they go high instead. How do I tell the 74HC595 to set output pins as low when they're active?

I know very little about these shift registers except what I have read but you are shifting out 8 bits right? Can't you just invert them.

In other words, if you are shifting {0,0,1,1,1,1,1,1} to make a zero (I'm not sure that is the right order but it is irrelevent), then send a {1,1,0,0,0,0,0,0} instead.



I don't get it, if you can currently write a high why can't you write a low?


Sacman is exactly correct, I was thinking about it wrong. When I write a value to the shift register it sets those the pins high, and the other pins low. So if I want a specific pin low, I just invert that, and instead write the inverted value which causes the other pins to be high.

I hope you use limiting resistor at EACH segment… The 74HC595 can only sink in/out max 20 mA <–I think ? I use 330 ohms or better 470 ohms limiting resistor.

And I discover Out 0 is MSB, I was thinking Out 0 is LSB, but no. So Out 7 is the LSB. I got mine working anyway. If I was using to control a 7 segments, I use transistors to control the segments if I use a commun anode type. It is less confusing for programing.

I guess if you want to display the number 4 a cc is : abcdefg → 0110011 = 51 For a ca : Not 51 → ! 51 = 1001100 = 76.