I have 8 leds in a line, and a PIC microcontroller with 8 free digital outputs and one free pwm output.
I need to control the leds in a way that at first they are all on, then the rightmost begins to fade to zero, once it reaches zero it stays off and the seventh begins to fade and so on untill all are off.
Can this be done using only 8 outputs and a PWM?
I thought to power the leds directly with the output, wether they are on or off, and to use the pwm with diodes to PWM the turned off leds. Problem is that with this solution all the off led's turn on by the pwm.. I need only the very last one to be fading.
Can this be done using only very basic components like diodes, and similar?