How to use 74HC595 with only one Arduino pin?

Hi,
I have only one pin left on my chip and would like to control a custom Led ring by using any component that allow me to drive a bunch of led from one pin. For other reasons i can not use the Led Ring WS2812 i have to use multiple single led.

It's look like the best will be the shift register 74HC595 but based on what i see on few tutorial this use 3 pins of Arduino.

Is it a way to use only one pin?

You could use one pin (and a ground connection) to send serial commands to another Arduino, which executes the commands.

Nope. Limited functionality can be achieved with 3, or possibly 2 pins (I am unsure off the top of my head if that's possible), but you will always need a data and a clock line.

The only way you'd be able to control multiple LEDs with only one pin is via something like the WS2812 or a WS2811 IC with discrete LEDs (the common "christmas light" shaped strings (often sold as WS2812, which they are not - the WS2812 is the version with the control chip integrated into a 6-pin RGB led package, while the WS2811 is a separate 8-pin IC that gets connected to 3 LEDs.

I think it's either that or a second arduino controlled via serial.

yeah using 2 Arduino could do the job for sure but don't want to use unnecessary space and not too much more memory.

I use an Attiny84 and I'm thinking to finally use a ATMEGA328P SMD version which is pretty small.

This idea might help you

This look great, i did not see an example with led but i will read it closely and do some experimentation.
Thanks

A bunch of addressable LEDs only use one pin.
Leo..

You use two of the pins currently used for controlling individual LEDs and fit a 74HC595. Then use pins from the 74HC595 to replace the two pins you had to sacrifice to get the 74HC595 to run.

If you then haven't got enough pins on one 74HC595 then simply chain two or more 74HC595s together. They still only occupy the same three Arduino pins.

Good strategy! My custom led ring will have only 8 led.

Q1: what other components are you using - and on which pins?
Q2: Is there already a SPI or I2C bus in place?

The "WS2812" addressable LEDs / Neopixels are also available in the classic 5mm form. Search for APA106. All APA106 LEDs will just need one data pin.

I use buzzer, sensors, etc... yes i use SPI. Anyway i do not want to change to much there.
I will try what @Grumpy_Mike suggested.
Thanks all.

why a shift register at all? you could use a SPI port expander like an MCP23S17 also. And you wouldn't need to change anything of the existing wiring. Just add the MCP (or several) and use the CS of the free pin.

which one you should consume less? Power consumption and space are critical. An do not want to manage the low power state on another chip. I guess this will ply like another mcu.

Port expanders and shift registers naturally use very little power. They have no low power states and don't need them.

I found this one: https://prog.world/saving-pins-for-arduino-single-wire-shift-register-control-74hc595/

At least there is some Arduino code and a diagram, I will test next time.
Thanks.