Shift Registers - possible for ground switching?

Hi all!

I'm currently using a Teensy 3.5 to control 9 LEDs on an existing PCB in my car. The board is part of the dash electronics so I don't want to mess with it. To control the LEDs, I have to provide a ground for each one, since the PCB provides a 5.5v rail to each LED with a resistor, the cathode then runs to the output connector that I'm plugging into. I'd like to try to control this with a shift register to save on pins, but the examples I've seen all see the shift register working on the high side with a common ground to the LEDs (like with the 74HC165).

Does a chip exist that can be used for ground switching like I have described?

Thanks! Nick

All logic chips can switch to ground. The only possible restriction applies to the opposite direction, where open collector outputs can not switch to Vcc..

Standard CMOS logic outputs are symmetric totem-pole (push-pull) output, doesn't matter which way you use them.

You bet! :+1:

TPIC6B595. Very useful indeed.

You have been picking very poor examples then. :roll_eyes:

Whatever does the 74HC165 have to do with it?

1 Like

Thanks everyone, and thanks for the recommendation of this chip - it looks perfect!

Now to figure out how to use it. Aside from the obvious drain pins, vcc and grounds. I think I need to connect:

Pin 9 (output enable active low) = ground
Pin 12 RCK (register clock) = VCC???
Pin 3 SERIN = arduino data out pin. I'm using a teensy so one of the MOSI pins
Pin 18 SEROUT = another shift register if using one (which I will be)
Pin 15 SRCK = Arduino clock pin. I'm using a teensy so I guess one of the SCK pins?
Pin 8 SRCLR (clear register) = Connected to vcc

I'll have a look at some example sketches tomorrow and perhaps order one to test on my breadboard :slight_smile:

I think its just like any other '595 for pinout. RCK is the latch input, you have to toggle it to change the outputs after shifting stuff in, so it needs an Arduino pin.

Don't forget decoupling for the chip. Always needed for logic chips.

Thanks Mark! Ah that's the latch - got it. Was wondering which one that was! When you say decoupling, what do you mean exactly?

Grumpy Mike's guide:

In short 100nF ceramic cap from Vcc to ground for each chip, at the chip. If switching significant currents maybe 1uF is better.

1 Like

The special feature of the '595 is the addition of the output register controlled by the latch pin. Say, you have 8 LED's connected to the outputs. You can clock in any byte and latch it so the LEDs show that. Then you can clock in any other byte, even slowly, and the LEDs will not change until you pulse the latch pin again!

Brilliant thanks Mark! Will take a read...

Hi Mark,

A quick question on this. I'm designing an updated version of the PCB and I'm wondering (for space reasons):

Does the de-coupling cap have to be only between the VCC and GND pin of the IC? In my application, I have +5V coming in to the area of the board with these ICs, and +5v is shared between two shift registers, and pullup resistors for 16 opto-isolator pins, plus anode supply for 13 opto-isolator inputs. I can probably guess what you're going to say, but I would much prefer to put one larger (0.1μF?) cap across the 5V+ and GND feed to this very tight area of the PCB if possible.

Here's a screen grab of my working design - I'm trying to keep it right to the bottom corner of the board, mirrored on both top and bottom planes. As you can see, it would be quite tricky to slip a cap in there to specifically cater for the VCC and GND pin of the shift registers (both in the centre)

Decoupling caps should never be an after-thought. A 100nF ceramic cap can be small, 0603 even, if space is tight. I sometimes just put them on the underside.
Supply traces should be wider than signal traces.