fade for multiple leds

Hi all,

I would like to fade 100+/- leds on and off just like the basic example using shift registers. Feasible, and any advice on code?

Thanks in advance - C

I take it you want to fade each LED individually.

One thing you will need to decide is how many steps of fading you need. For each level of fade you have to refresh the display. If you have, say 128 LED’s (8x16 array) and you want 64 levels of fade you have to set the 8192 bits per refresh. If you want to refresh 60 times a second you need to push about half a megabit per second. You can push as much as 8 megabits per second into shift registers through SPI so the hardware shouldn’t be your problem. You just have to write the software.

Actually trying to fade half at a time, then the other half. I am quite lost in reasearching how to write code utilizing PWM via a shift register. Been searching online for quite sometime. Any code advice, or links to anything that may help is greatly appreciated!

If you only have two groups of LED's you don't need any shift registers. You can use one PWM output pin and a power transistor (or MOSFET) for each group. You will need a power supply capable of powering all of the LED's.

yes. apologies, should have added that I will be running different sequences (chase, etc) that will require registers. The fade sequence I would like to add would be through the registers because of this.

You're in luck. Someone just posted a library for doing PWM on many LED's connected with shift registers: http://arduino.cc/forum/index.php/topic,66988.0/topicseen.html

I think they mention handling up to 768 LED's.

Perfect! Thank you, I will look into right away.